Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime Not Supported For ReportDownloadsApi Rest Api #38

Open
floorz opened this issue Oct 27, 2019 · 1 comment
Open

DateTime Not Supported For ReportDownloadsApi Rest Api #38

floorz opened this issue Oct 27, 2019 · 1 comment

Comments

@floorz
Copy link

floorz commented Oct 27, 2019

Issue

Passing a DateTime object as the $reportDate parameter into CyberSource\Api\ReportDownloadsApi::downloadReport($reportDate, $reportName, $organizationId = null) produces an error, despite it being a valid parameter type.

Seems to be due to the the CyberSource\ObjectSerializer formatting the date as \DateTime::ATOM which does not appear to be supported. Only date format that worked was a string value in the format of YYYY-MM-DD, which your examples do show.

Related Issue

I only bring this up because I'm converting a client to the Rest API to continue to receive their daily reports. The main issue I've been running into is that the transaction dates in at least the ConversionDetailReport_Daily_Classic report are coming back inconsistently when I pass the same date for US/CA/UK cybersource accounts. The UK report is returning transaction dates for two days ago instead of the previous day.

Example:
If I passed 2019-10-25 for US/CA/UK accounts I get the following transaction start/end dates in the reports:

US:
ReportStartDate="2019-10-24T07:00:00Z-08:00"
ReportEndDate="2019-10-25T07:00:00Z-08:00"

CA:
ReportStartDate="2019-10-24T00:00:00Z+00:00"
ReportEndDate="2019-10-25T00:00:00Z+00:00"

UK:
ReportStartDate="2019-10-23T23:00:00Z+00:00"
ReportEndDate="2019-10-24T23:00:00Z+00:00"

Known Affected Reports

  • ConversionDetailReport_Daily_Classic
  • PaymentBatchDetailReport_Daily_Classic
  • TransactionDetailReport_Daily_Classic

return $value->format(\DateTime::ATOM);

@snavinch
Copy link
Contributor

Hi, Thanks for bringing this to our notice, Can you please provide the exact request you used and the response you got.
We noticed that the datetime format is incorrect.
ISO-8601 indicates that appending ‘Z’ at the end of the datetime is equivalent of +00.00 (GMT) . The time 2019-10-24T07:00:00Z -08.00 is invalid. Can you please check?
Also please provide the merchant id for which you got the above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants