GetOpenAuths
- Method
SlimCD.Reports.GetOpenAuths2
Purpose
Get the unforced authonly transactions for a particular site/date range, returning a standard BatchTransaction.Description
Returns a BatchTransaction record for each AUTH that has not been VOIDed or FORCEd. Each of the auths will not be funded until the FORCE is performed. This command requires a DATE/TIME rather than just DATE. The format for DATE/TIME is in .NET/Microsoft SQL format of either 24-hour format as “MM/DD/YYYY HH:MM:SS.mmm” or the same format as 12-hour, with AM or PM appended to the date/time.Business Rules
Argument List
Name Required Usage GetOpenAuthsRequest 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
GetOpenAuths Request Fields
Field Name Type Length Required Description Username string 20 require Username or API Access Credential that accesses web service. Password int 20 require Plaintext password for the client account. SiteID integer 10 optional Assigned by the Slim CD administrator.. StartDate date 10 require * Plaintext password for the client account. EndDate date 10 require * Plaintext password for the client account. 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
- OpenAuthReport
- BatchTransaction
- 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
- BatchTransaction
- OpenAuthReport
Remarks
- General
- Names in name/value pairs are NOT case-sensitive
- Names inside XML tags ARE case-sensitive
- Function-Specific
- None
- reply
- Include
012<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script>
Method
1234function GetOpenAuths2(request,callback)function GetOpenAuths2(request,timeout,callback)
Request
123456789request= {"username": "R6UT8C6M","password": "","siteid": "0","startdate": "","enddate": ""}
Reply
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849callback ( {"reply":{"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetOpenAuths2","datablock": {"OpenAuthReport": {"BatchTransaction": {"gateid": "78425075","transactiondate": "7/19/2013 11:37:23 AM","transtype": "AUTH","processor": "VTL","siteid": "228226448","batchno": "0","approved": "Y","cardtype": "V","cardid": "3766459","cardnumber": "4446-XXXX-XXXX-7892","amount": "7.77","authcode": "TAS958","cvv2reply": null,"avsreply": null,"trackindicator": "2","voided": "0","requestingip": "192.64.54.196","firstname": "TEST","lastname": "WORLDPAY","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "NONE","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","clienttransref": null,"giftbalance": "0.00","cashback": null}}}} );
Sample Code
1234567891011121314151617181920<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script>// <![CDATA[SlimCD.Reports.GetOpenAuths({"username": "R6UT8C6M","password": "","siteid": "0","startdate": "","enddate": ""},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});// ]]></script>
Downloads
- Include
012include 'slimcd.php';
Method
123function Reports_GetOpenAuths(Reports_GetOpenAuthsRequest $request,$timeout=false)Request
123456789101112class Reports_GetOpenAuthsRequest{// property declarationpublic $username = '';public $password = '';public $siteid = 0;public $StartDate ='';public $EndDate ='';}JSON Reply
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748{"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetOpenAuths2","datablock": {"OpenAuthReport": {"BatchTransaction": {"gateid": "78425075","transactiondate": "7/19/2013 11:37:23 AM","transtype": "AUTH","processor": "VTL","siteid": "228226448","batchno": "0","approved": "Y","cardtype": "V","cardid": "3766459","cardnumber": "4446-XXXX-XXXX-7892","amount": "7.77","authcode": "TAS958","cvv2reply": null,"avsreply": null,"trackindicator": "2","voided": "0","requestingip": "192.64.54.196","firstname": "TEST","lastname": "WORLDPAY","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "NONE","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","clienttransref": null,"giftbalance": "0.00","cashback": null}}}}Sample Code
123456789101112131415161718192021222324include 'slimcd.php';// Create the Slim CD object$SlimCD = new SlimCD() ;// Create a GetDailySummary Request class$request = new Reports_GetDailySummaryRequest() ;$request->username = '1032';$request->password = '289075';$request->metabankid='0';$request->bankid='0';$request->clientid='0';$request->siteid='0';$request->startdate="";$request->enddate="";$result = $SlimCD->Reports_GetDailySummary($request);if ($result->response == 'Success') {echo 'Success!' ;}else {echo $result->response . ':' . $result->description ;}Downloads
Download full sample source. - Include
123using SlimCD;
Method
123public GetOpenAuthsReply GetOpenAuths(GetOpenAuthsRequest request, int timeout);
Request
12345678910public class GetOpenAuthsRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string startdate { get; set; }public string enddate { get; set; }}
Reply
123456789101112public class GetOpenAuthsReply{public string response;public string responsecode;public string description;public string responseurl;public string OpenBatchReport;public string senddata;public string recvdata;}
Cross Reference: ClientSample Code
12345678910111213141516171819202122SlimCD.Reports reports = new SlimCD.Reports();reports.debug = true;reports.transURL = TransURL;reports.statsURL = StatsURL;GetOpenAuthsRequest request = new GetOpenAuthsRequest();GetOpenAuthsReply reply = new GetOpenAuthsReply();request.username = "R6UT8C6M";request.password = "";request.siteid = 0;request.startdate ="" ;request.enddate = "";reply = reports.GetOpenAuths(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 GetOpenAuths(GetOpenAuthsRequest request, int timeout);
Request
12345678910public class GetOpenAuthsRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string startdate { get; set; }public string enddate { get; set; }}
Reply
123456789101112public class GetOpenAuthsReply{public string response;public string responsecode;public string description;public string responseurl;public string OpenBatchReport;public string senddata;public string recvdata;}
Cross Reference: ClientSample Code
12345678910111213141516171819202122SlimCD.Reports reports = new SlimCD.Reports();reports.debug = true;reports.transURL = TransURL;reports.statsURL = StatsURL;GetOpenAuthsRequest request = new GetOpenAuthsRequest();GetOpenAuthsReply reply = new GetOpenAuthsReply();request.username = "R6UT8C6M";request.password = "";request.siteid = 0;request.startdate ="" ;request.enddate = "";reply = await reports.GetOpenAuths(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 (^ReportsGetOpenAuthsReplyBlock)(ReportsGetOpenAuthsReply *reply);- (void) reportsGetOpenAuthsWithRequest:(ReportsGetOpenAuthsRequest*)request replyBlock:(ReportsGetOpenAuthsReplyBlock)replyBlock;- (void) reportsGetOpenAuthsWithRequest:(ReportsGetOpenAuthsRequest*)request timeout:(NSTimeInterval)timeout replyBlock:(ReportsGetOpenAuthsReplyBlock)replyBlock;Request
1234567891011@interface ReportsGetOpenAuthsRequest@property (strong) NSString *userName;@property (strong) NSString *password;@property (strong) NSNumber *siteID;@property (strong) NSDate* startDate;@property (strong) NSDate* endDate;@endReply
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647@interface ReportsGetOpenAuthsReply : SlimCDReply// Array of BatchTransactionRecord objects.@property (strong) NSArray *openAuths;@end@interface BatchTransactionRecord : 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 *cardID;@property (strong) NSString *cardNumber;@property (strong) NSString *amount;@property (strong) NSString *authCode;@property (strong) NSString *cvv2Reply;@property (strong) NSString *avsReply;@property (strong) NSString *trackIndicator;@property (strong) NSString *voided;@property (strong) NSString *requestingIP;@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 *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;@endSample Code
12345678910111213141516171819202122SlimCD *api = [[SlimCD alloc] init];ReportsGetOpenAuthsRequest *request = [[ReportsGetOpenAuthsRequest alloc] init];request.userName = @"1032";request.password = @"289075";request.siteID = @228226448;request.startDate = [NSDate date];request.endDate = [NSDate date];[api reportsGetOpenAuthsWithRequest:request replyBlock:^(ReportsGetOpenAuthsReply *reply ){if ( reply.responseCode == RC_SUCCESS ){NSLog(@"Open auths loaded successfully.");}else{NSLog(@"Unable to load open auths.");}}]; - Method
123456public void getOpenAuths(GetOpenAuthsRequest reportOpenAuthRequest,int timeout ,GetOpenAuthsCallback callback)public void getOpenAuths(GetOpenAuthsRequest reportOpenAuthRequest,GetOpenAuthsCallback callback)
Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253public class GetOpenAuthsRequest {private String username;private String password;private int siteid;private String startdate;private String enddate;public GetOpenAuthsRequest(){// set the default value.username="";password="";siteid=0;startdate="";enddate="";}// setters and 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 getSiteid() {return siteid;}public void setSiteid(int siteid) {this.siteid = siteid;}public String getStartdate() {return startdate;}public void setStartdate(String startdate) {this.startdate = startdate;}public String getEnddate() {return enddate;}public void setEnddate(String enddate) {this.enddate = enddate;}}
Reply
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758public class GetOpenAuthsReply {private String response="";private String responsecode="";private String description="";private String responseurl="";private String sentdata="";private String recvdata="";// setters and getters.private OpenAuthReport openAuthsReport;public String getResponse() {return response;}public OpenAuthReport getOpenAuthsReport() {return openAuthsReport;}public void setOpenAuthsReport(OpenAuthReport openAuthsReport) {this.openAuthsReport = openAuthsReport;}public void setResponse(String response) {this.response = response;}public String getResponsecode() {return responsecode;}public void setResponsecode(String responsecode) {this.responsecode = responsecode;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public String getResponseurl() {return responseurl;}public void setResponseurl(String responseurl) {this.responseurl = responseurl;}public String getSentdata() {return sentdata;}public void setSentdata(String sentdata) {this.sentdata = sentdata;}public String getRecvdata() {return recvdata;}public void setRecvdata(String recvdata) {this.recvdata = recvdata;}}
Sample Code
12345678910111213141516171819202122232425262728// set the request parameter.GetOpenAuthsRequest request=new GetOpenAuthsRequest();request.setUsername("R6UT8C6M");request.setPassword("");request.setEnddate("");request.setSiteid(0);request.setStartdate("");//To make web service request.new ReportsGetOpenAuths().getOpenAuths(request, new GetOpenAuthsCallback() {@Overridepublic void getOpenAuthsReply(GetOpenAuthsReply 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.
123456789<!--?xml version="1.0" encoding="utf-8" ?-->Success0OKhttps://stats.slimcd.com/wswebservices/reports.asmx/GetOpenAuths2If 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=GetOpenAuths2
Protocols- HTTP POST
- HTTP GET
This function accepts either name/value pairs or JSON
Request
Reply
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{"reply": {"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/reports.asmx/GetOpenAuths2","datablock": {"OpenAuthReport": {"BatchTransaction": {"gateid": "78425075","transactiondate": "7/19/2013 11:37:23 AM","transtype": "AUTH","processor": "VTL","siteid": "228226448","batchno": "0","approved": "Y","cardtype": "V","cardid": "3766459","cardnumber": "4446-XXXX-XXXX-7892","amount": "7.77","authcode": "TAS958","cvv2reply": null,"avsreply": null,"trackindicator": "2","voided": "0","requestingip": "192.64.54.196","firstname": "TEST","lastname": "WORLDPAY","address": null,"city": null,"state": null,"zip": null,"country": null,"phone": "na","email": null,"clerkname": "NONE","po": null,"salestax": "0.00","salestaxtype": "0","tip": "0.00","clienttransref": null,"giftbalance": "0.00","cashback": null}}}}Sample Code
Remarks
- None