Reporting – COM

Reporting – COM

The Payment Engine reporting SDK is available through COM.

Request

The full list of supported request properties is available through COM. (For a full list see the API.)

Sample Code

Report:Approved
Dim MyRequest As PaymentAppCOM.ReportRequest
Set MyRequest = New PaymentAppCOM.ReportRequest
     MyRequest.xKey = "" 'Credential
     MyRequest.xVersion = "4.5.4" 'API Version
     MyRequest.xSoftwareName = "Test"
     MyRequest.xSoftwareVersion = "1.0" 'Version of your software
     MyRequest.xCommand = "report:approved"
     'MyRequest.xAmount = "a=8.1" 'Uncomment to test Filtering
     MyRequest.xBeginDate_Set (DateAdd("d", -7, Date))
     MyRequest.xEndDate_Set (DateAdd("d", 1, Date))
     'MyRequest.xFields = "xrefnum,xname"  'Fields to include in the response
Dim MyResponse As PaymentAppCOM.ReportResponse
Set MyResponse = MyRequest.Process()
Report:Transaction
Set MyRequest = New PaymentAppCOM.ReportRequest
     MyRequest.xKey = "" 'Credential
     MyRequest.xVersion = "4.5.4" 'API Version
     MyRequest.xSoftwareName = "Test"
     MyRequest.xSoftwareVersion = "1.0" 'Version of your software
     MyRequest.xCommand = "report:transaction"
     MyRequest.xRefNum = ""
     'MyRequest.xFields = "xrefnum,xname"  'Fields to include in the response
Dim MyResponse As PaymentAppCOM.ReportResponse
Set MyResponse = MyRequest.Process()

Response

The full list of response properties are available through COM as well as the following functions:

  • string xReportData_JSON
  • string xReportData_CSV
  • string xReportData_XML

Sample Code

Dim MyResponse As PaymentAppCOM.ReportResponse
Set MyResponse = MyRequest.Process()
If MyResponse.xError <> "" Then
     MsgBox "Error: " & MyResponse.xError
Else
     Dim JsonFilePath As String, CSVFilePath As String, XMLFilePath As String
     JsonFilePath = ""
     CSVFilePath = ""
     XMLFilePath = ""
     Open JsonFilePath For Output As #1
     Print #1, MyResponse.xReportData_JSON
     Close #1
     Open CSVFilePath For Output As #2
     Print #2, MyResponse.xReportData_CSV
     Close #2
     Open XMLFilePath For Output As #3
     Print #3, MyResponse.xReportData_XML
     Close #3
End If