CTI_DownloadReport()
This subprocedure is used to download a report from the CyberSource REST reporting APIs. This subprocedure requires a record for your merchant ID in CTICFGRPT, and you must populate the record with a shared and secret key pair for use with CyberSource’s HTTP Signature Authentication. For more information on generating these keys, please see this guide from CyberSource: Create a Shared Secret Key for HTTP Signature Authentication
The ADDRPTKEY command can be used to easily create a record for your merchant ID and generated security keys in CTICFGRPT.
The report will be downloaded to an IFS file in the download directory specified in your CTICFGMCH record. For the CTI_REPORT_BATCHDETAIL and CTI_REPORT_EXCEPTIONDETAIL reports, this file can be parsed with the corresponding parsing subprocedure. If you are downloading a custom report, please reach out to our support team at isupport@katointegrations.com for guidance on parsing the downloaded report.
If an error occurs, this subprocedure will return *OFF, and information about the error will be present in the pErrorDS parameter which contains a CTI_ErrorDS_t data structure.
Subprocedure Prototype
|
Returns *OFF if an error occurs during processing, *ON otherwise. |
|
Unique ID generated with CTI_NextUniqueID() Required |
|
A data structure containing configuration information for the report to be downloaded Required |
|
Error data structure used to capture subprocedure and CyberSource errors Required |
Data Structures
|
|
|
Merchant ID used to process the transaction Required |
|
CyberSource environment where the report will be retrieved from Required Valid Values:
|
|
Unique label to identify the security key in CTICFGRPT to be used Default Value: |
|
Organization under which the report was generated in the CyberSource business center |
|
Name of the report to be downloaded. This can be one of the pre-defined constants, or any custom report name Valid Values:
|
|
End date for the report |
|
Name of the file where the report will be downloaded. This file will be saved in the default download directory set for the specified merchant ID in CTICFGMCH |
|
|
|
Name of subprocedure returning error |
|
Message ID of error message |
|
Error message text |
|
Error message source |
|
IFS filepath of generated log file |
Input Table Files
|
Record CyberSource Report API Configuration Record |
|
Key Merchant ID for the reporting account |
|
Key CyberSource environment for which the security key was generated |
|
Key Optional unique identifier for the security key, to allow multiple keys for one merchant ID/environment |
|
CyberSource HTTP Signature Authentication shared key |
|
CyberSource HTTP Signature Authentication secret key |