GetTransactionDetails
- Method
SlimCD.Reports.GetTransactionDetails2Purpose
Get the details of a specific transaction with the same format as SearchTransactions2.Description
Returns a standard Transaction item, with all of the details needed to reprint a receipt or identify the type of transaction as card, check, or gift.Business Rules
Argument List
Name Required Usage GetTransactionDetailsRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
GetTransactionDetails Request Fields
Field Name Type Length Required Description Username string 20 require Username or API Access Credential that accesses web service. Password string 20 require Plaintext password for the client account. GateID integer 12 conditional Gateway ID for previous transaction. 1. Passwords are required except when the username is set to an API Access Credential, in which case it should be passed in as an empty string.
Reply Fields
reply outer tag for the reply data block response Success, FAIL, Error response code 0, 1, 2 (respective) matching the above description If successful, this will contain the single word, OK. Otherwise it will contain a description of failure or error which occurred reponseurl The Slimcd.com url which was called for this operation datablock The confirmation text returned from the server. Reply Hierarchy
- reply
- response
- responsecode
- description
- responseurl
- datablock
- Transactions
- Transactions
- gateid
- transactiondate
- transtype
- processor
- siteid
- batchno
- approved
- cardtype
- cardid
- cardnumber
- amount
- authcode
- cvv2reply
- avsreply
- trackindicator
- voided
- requestingip
- firstname
- lastname
- address
- city
- state
- zip
- country
- phone
- clerkname
- po
- salestax
- salestaxtype
- tip
- clienttransref
- giftbalance
- cashback
- Transactions
- Transactions
Remarks
- General
- Names in name/value pairs are NOT case-sensitive
- Names inside XML tags ARE case-sensitive
- Function-Specific
- None
- reply
- Include
012Method
1234function GetTransactionDetails(request,callback)function GetTransactionDetails(request,timeout,callback)Request
1234567request= {"username": "1032","password": "289075","gateid": "78022528"}Reply
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657callback ( {"reply": {"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetTransactionDetails2","datablock": {"Transactions": {"Transaction": {"gateid": "78022528","transactiondate": "7/12/2013 4:04:26 AM","transtype": "SALE","processor": "VTL","siteid": "228226448","approved": "Y","cardtype": "A","cardpresent": "True","proc_code": "OK","cardid": "11959","cardnumber": "3714-XXXX-XXXX-431","amount": "12.00","authcode": "AXS290","cvv2reply": null,"avsreply": null,"checkid": "0","checkno": null,"routeno": null,"accountnumber": null,"trackindicator": "0","voided": "0","requestingip": "192.168.101.120","remoteip": "192.168.0.120","firstname": "zeyuan","lastname": "wu","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "ADMIN","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","reference": "15735439","clienttransref": null,"proc_response": "AXS290","giftbalance": "1234.00","cashback": null}}}} );Sample Code
123Downloads
- Include
012include 'slimcd.php';
Method
123function Reports_GetTransactionDetails(Reports_GetTransactionDetailsRequest $request,$timeout=false)Request
12345678910class Reports_GetTransactionDetailsRequest{// property declarationpublic $username = '';public $password = '';public $gateid = 0;}JSON Reply
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetTransactionDetails2","datablock": {"Transactions": {"Transaction": {"gateid": "78022528","transactiondate": "7/12/2013 4:04:26 AM","transtype": "SALE","processor": "VTL","siteid": "228226448","approved": "Y","cardtype": "A","cardpresent": "True","proc_code": "OK","cardid": "11959","cardnumber": "3714-XXXX-XXXX-431","amount": "12.00","authcode": "AXS290","cvv2reply": null,"avsreply": null,"checkid": "0","checkno": null,"routeno": null,"accountnumber": null,"trackindicator": "0","voided": "0","requestingip": "192.168.101.120","remoteip": "192.168.0.120","firstname": "zeyuan","lastname": "wu","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "ADMIN","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","reference": "15735439","clienttransref": null,"proc_response": "AXS290","giftbalance": "1234.00","cashback": null}}}}Sample Code
12345678910111213141516171819include 'slimcd.php';// Create the Slim CD object$SlimCD = new SlimCD() ;// Create a GetTransactionDetails Request class$request = new Reports_GetTransactionDetailsRequest() ;$request->username = 1032;$request->password = 289075;$request->gateid = 78022528;$result = $SlimCD->Reports_GetTransactionDetails($request);if ($result->response == 'Success') {echo 'Success!' ;}else {echo $result->response . ':' . $result->description ;}Downloads
Download full sample source. - Include
123using SlimCD;
Method
123public GetTransactionDetailsReply GetTransactionDetails(GetTransactionDetailsRequest request, int timeout);
Request
12345678public class GetTransactionDetailsRequest{public string username { get; set; }public string password { get; set; }public int gateid { get; set; }}
Reply
123456789101112public class GetTransactionDetailsReply{public string response;public string responsecode;public string description;public string responseurl;public string Transaction;public string senddata;public string recvdata;}
Cross Reference:Â ClientSample Code
123456789101112131415161718192021SSlimCD.Reports reports = new SlimCD.Reports();reports.debug = true;reports.transURL = TransURL;reports.statsURL = StatsURL;GetTransactionDetailsRequest request = new GetTransactionDetailsRequest();GetTransactionDetailsReply reply = new GetTransactionDetailsReply();request.username = 1032;request.password = 289075;request.gateid = 78022528;reply = reports.GetTransactionDetails(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}Downloads
Download full sample source. - Include
123using SlimCD;
Method
012public async Task GetTransactionDetails(GetTransactionDetailsRequest request, int timeout);
Request
12345678public class GetTransactionDetailsRequest{public string username { get; set; }public string password { get; set; }public int gateid { get; set; }}
Reply
123456789101112public class GetTransactionDetailsReply{public string response;public string responsecode;public string description;public string responseurl;public string Transaction;public string senddata;public string recvdata;}
Cross Reference:Â ClientSample Code
1234567891011121314151617181920SlimCD.Reports reports = new SlimCD.Reports();reports.debug = true;reports.transURL = TransURL;reports.statsURL = StatsURL;GetTransactionDetailsRequest request = new GetTransactionDetailsRequest();GetTransactionDetailsReply reply = new GetTransactionDetailsReply();request.username = 1032;request.password = 289075;request.gateid = 78022528;reply = await reports.GetTransactionDetails(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}Downloads
- Include
012#import "SlimCD.h"
Method
1234567typedef void (^ReportsGetTransactionDetailsReplyBlock)(ReportsGetTransactionDetailsReply *reply);- (void) reportsGetTransactionDetailsWithRequest:(ReportsGetTransactionDetailsRequest*)request replyBlock:(ReportsGetTransactionDetailsReplyBlock)replyBlock;- (void) reportsGetTransactionDetailsWithRequest:(ReportsGetTransactionDetailsRequest*)request timeout:(NSTimeInterval)timeout replyBlock:(ReportsGetTransactionDetailsReplyBlock)replyBlock;Request
123456789@interface ReportsGetTransactionDetailsRequest@property (strong) NSString *userName;@property (strong) NSString *password;@property (strong) NSNumber *gateID;@endReply
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556@interface ReportsGetTransactionDetailsReply : SlimCDReply@property (strong) TransactionRecord *transaction;@end@interface TransactionRecord : SlimCDObject@property (strong) NSNumber *gateID;@property (strong) NSString *transactionDate;@property (strong) NSString *transType;@property (strong) NSString *processor;@property (strong) NSNumber *siteID;@property (strong) NSString *batchNo;@property (strong) NSString *approved;@property (strong) NSString *cardType;@property (strong) NSString *cardPresent;@property (strong) NSString *procCode;@property (strong) NSString *cardID;@property (strong) NSString *cardNumber;@property (strong) NSString *amount;@property (strong) NSString *authCode;@property (strong) NSString *cvv2Reply;@property (strong) NSString *avsReply;@property (strong) NSString *checkID;@property (strong) NSString *checkNo;@property (strong) NSString *routeNo;@property (strong) NSString *accountNumber;@property (strong) NSString *trackIndicator;@property (strong) NSString *voided;@property (strong) NSString *requestingIP;@property (strong) NSString *remoteIP;@property (strong) NSString *firstName;@property (strong) NSString *lastName;@property (strong) NSString *address;@property (strong) NSString *city;@property (strong) NSString *state;@property (strong) NSString *zip;@property (strong) NSString *country;@property (strong) NSString *phone;@property (strong) NSString *email;@property (strong) NSString *clerkName;@property (strong) NSString *procResponse;@property (strong) NSString *server;@property (strong) NSString *po;@property (strong) NSString *salesTax;@property (strong) NSString *salesTaxType;@property (strong) NSString *tip;@property (strong) NSString *clienttransref;@property (strong) NSString *giftBalance;@property (strong) NSString *cashBack;@property (strong) NSString *surcharge;@endSample Code
1234567891011121314151617181920SlimCD *api = [[SlimCD alloc] init];ReportsGetTransactionDetailsRequest *request = [[ReportsGetTransactionDetailsRequest alloc] init];request.userName = @"1032";request.password = @"289075";request.gateID = @12345;[api reportsGetTransactionDetailsWithRequest:request replyBlock:^(ReportsGetTransactionDetailsReply *reply ){if ( reply.responseCode == RC_SUCCESS ){NSLog(@"Transaction details loaded successfully.");}else{NSLog(@"Unable to load transaction details.");}}]; - Method
1234567public void getTransactionDetails(GetTransactionDetailsRequest reportTrnsactionDetailRequest,int timeout,GetTransactionDetailsCallback callback)public void getTransactionDetails(GetTransactionDetailsRequest reportTrnsactionDetailRequest,GetTransactionDetailsCallback callback)
Request
1234567891011121314151617181920212223242526272829303132333435363738public class GetTransactionDetailsRequest {private String username;private String password;private int gateid;// Set default value.public GetTransactionDetailsRequest(){// set default value.username="";password="";gateid=0;}// setters an getters.public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public int getGateid() {return gateid;}public void setGateid(int gateid) {this.gateid = gateid;}}
Reply
1234567891011121314public class GetTransactionDetailsReply{private Transactions transactions=null;// setters an getters.public Transactions getTransactions() {return transactions;}public void setTransactions(Transactions transactions) {this.transactions = transactions;}}
Sample Code
12345678910111213141516171819202122232425262728// set the request parameter.GetTransactionDetailsRequest request=new GetTransactionDetailsRequest();request.setUsername("1032");request.setPassword("289075");request.setGateid(78022528);// To make web service request.newReportsGetTransactionDetails().getTransactionDetails(request,new GetTransactionDetailsCallback(){@Overridepublic void getTransactionDetailsReply(GetTransactionDetailsReply reply) {if (reply.getResponse().equals("Success"))textBox.setText("Success");elsetextBox.setText("There was a problem:\n" + reply.getResponse() +"\n Descriptin "+ reply.getDescription());}});
Downloads
Download full sample source. - URLÂ
Protocols
- SOAP/XML
- HTTP POST
- HTTP GET
RequestÂ
Status Codes
Status Code Status Description Explanation 200 200 OK Approved or declined attempts will return a response with an XML reply block 500 500 Internal Server Error The response will not contain XML, as a server error has occurred. Reply Output is in XML format if a status code of 200 is returned.
12345Success0OKhttps://stats.slimcd.com/wswebservices/reports.asmx/GetTransactionDetails2780225287/12/2013 4:04:26 AMSALEVTL228226448YATrue<proc_code>OK119593714-XXXX-XXXX-43112.00AXS290000192.168.101.120192.168.0.120zeyuanwu12345678910111213naADMIN0.0000.0015735439<proc_response>AXS2901234.00If the block’s tag does not indicate “Success”, the tag will contain an error description which can be displayed to the end-user
Sample Code
DOWNLOAD
EXERCISER TOOL
Remarks
- Remarks Go here
- URL
123https://stats.slimcd.com/soft/json/jsonscript.asp?service=GetTransactionDetails2
Protocols- HTTP POST
- HTTP GET
This function accepts either name/value pairs or JSON
Request
Reply
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{"reply": {"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetTransactionDetails2","datablock": {"Transactions": {"Transaction": {"gateid": "78022528","transactiondate": "7/12/2013 4:04:26 AM","transtype": "SALE","processor": "VTL","siteid": "228226448","approved": "Y","cardtype": "A","cardpresent": "True","proc_code": "OK","cardid": "11959","cardnumber": "3714-XXXX-XXXX-431","amount": "12.00","authcode": "AXS290","cvv2reply": null,"avsreply": null,"checkid": "0","checkno": null,"routeno": null,"accountnumber": null,"trackindicator": "0","voided": "0","requestingip": "192.168.101.120","remoteip": "192.168.0.120","firstname": "zeyuan","lastname": "wu","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "ADMIN","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","reference": "15735439","clienttransref": null,"proc_response": "AXS290","giftbalance": "1234.00","cashback": null}}}}Sample Code
Remarks
- None