Pull a transaction report.
This method retrieves a report from the merchant console. Any reports, including custom reports, may be retrieved. The returned data is base 64 encoded. The format of the returned data can be HTML, comma separated (cvs), or tab separated (tab).
Names of built-in reports are prefaced with either “CreditCard:” or “Check:” For example, to pull “Sales by Date” for credit cards, the “Report” parameter would be set to “CreditCard:Sales by Date.”
To pull a custom credit card or check report, prefix the name with “Custom:” or “CustomCheck:” For example, to pull a custom report titled “Recurring Declines” set the “Report” parameter to “Custom:Recurring Declines.”
See also getTransactionStatus, getTransactionCustom, searchTransactions, searchTransactionsCustom, getTransaction
string getTransactionReport ( ueSecurityToken Token, string StartDate, string EndDate, string Report, string Format )
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
string | StartDate | The earliest report date to retrieve. |
string | EndDate | The latest report date to retrieve. |
string | Report | Name of report to retrieve. |
string | Format | Format of returned report data. Possible values are: html, cvs, or tab. |
string | Returns specified report data according to parameters set in search. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { $StartDate='2007/01/01'; $EndDate='2007/04/10'; $format='csv'; $res=$client->getTransactionReport($token, $StartDate,$EndDate,$format); $data=base64_decode($res); print_r($data); } catch (SoapFault $e) { die("Get Transaction failed :" .$e->getMessage()); } ?>
Dim refnum As String refnum = "46978031" Dim update(0 To 1) As usaepay.FieldValue For i As Integer = 0 To 1 update(i) = New usaepay.FieldValue Next update(0).Field = "Schedule" update(0).Value = "weekly" update(1).Field = "NumLeft" update(1).Value = "7" Dim response As String response = client.convertTranToCust(token, refnum, update) MsgBox(response)
string start = "2010-08-01"; string end = "2010-08-09"; string format = "html"; string report = "CreditCard:Sales By Date"; try { string response = client.getTransactionReport(token, start, end, report, format); byte[] decbuff = Convert.FromBase64String(response); MessageBox.Show(Encoding.UTF8.GetString(decbuff)); } catch (Exception err) { MessageBox.Show(err.Message); }