ProcessTransaction
- Method
Slimcd.Transact.ProcessTransaction
Purpose
Get all transactions in the current unsettled batch, returning a standard BatchTransaction.
Description
ProcessTransaction can be used to process SALE, AUTH/FORCE, VOID, CREDIT, TIPEDIT, UPDATE, and other transaction types. ProcessTransaction supports credit, debit, gift/loyalty and check processing. ProcessTransaction can accept direct payment data (such as cardnumber, track data, or check information) or can use tokenized data to charge cards already on file with SLIM CD.
Business Rules
Argument List
Name Required Usage ProcessTransactionRequest 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
ProcessTransactionRequest Fields
Field Name Type Length Required Description username value-2 20 value-4 Username or API Access Credential that accesses web service clientid value-2 10 value-4 Assigned by the Slim CD administrator password value-2 20 value-4 Plaintext password for the client account siteid value-2 10 value-4 Assigned by the Slim CD administrator priceid value-2 20 yes Assigned by the Slim CD administrator key value-2 value-3 yes SDK developer key obtained from Slim CD product value-2 32 no Product Name (Application name) version value-2 16 no Version ID of product kiosk value-2 16 16 readerpresent value-2 3 value-4 Contains the value “yes” or “no” for a card reader at the merchant’s location contactlessreader value-2 value-3 value-4 value-5 encryption_device value-2 20 no Default is blank, which causes automatic detection based on input. Valid option list will change, but currently: IDTECH, POSX, MAGTEK. Note that all devices default to KB mode, but HID mode can be used if trackdata is sent as all HEX digits encryption_type value-2 20 no Default is blank, which defaults to TDES. Valid option list will change, but currently: TDES or AES encryption_key value-2 20 no [row_columnIndicator of the key injected in the device. Default is blank, where key is determined from indicators in the trackdata[/row_column]
firstname value-2 20 value-4 First name of cardholder lastname value-2 20 value-4 Last name of cardholder address value-2 30 value-4 Cardholder address city value-2 20 value-4 city state value-2 20 value-4 state zip value-2 10 value-4 zip code country value-2 30 value-4 county phone value-2 20 value-4 Cardholder phone number email value-2 40 value-4 Cardholder Email address birthdate value-2 6 value-4 YYMMDD format for the date of birth driverslic value-2 2096 value-4 Drivers License, SSN, Military ID or Passport ID number, or Base64 Driver’s License bar code binary data ssn value-2 value-3 value-4 value-5 gateid value-2 12 value-4 Gateway ID for previous transaction usepooled value-2 value-3 value-4 value-5 processor_token value-2 64 Optional Returned by processor from previous transaction, if available temporary_token value-2 value-3 value-4 value-5 cardtype value-2 2 value-4 GC for gift card or LC for loyalty card corporatecard value-2 3 value-4 Contains the value “yes” or “no” trackdata value-2 varies value-4 Card swipe track data (See Appendix F) cardnumber value-2 20 value-4 Card number – used for verification expmonth value-2 2 value-4 Expiration month (MM) expyear value-2 4 value-4 Exp year (YYYY or YY) cvv2 value-2 4 value-4 CVV2 pinblockdata value-2 32 value-4 Contains the encrypted pin code and decryption key from the pinpad. This variable is processor-specific, and should be replaced by using the “pinblock” and “ksn” values as separate fields pinblockdata value-2 value-3 value-4 value-5 pinpadpresent String – – Values are yes/no or 1/0 postype String – – Values are ECR, MOBILE, TABLET ksn value-2 16 or 20 value-4 The Key Serial Number from the pinpad, to be used with “pinblock” as a replacement for the larger “pinblockdata” that contains both fields in one checks value-2 3 value-4 Must contain the value ‘yes’ micrreader value-2 3 value-4 Indicates presence of MICR reader – “yes” or “no” accttype value-2 value-3 value-4 value-5 checktype value-2 12 value-4 Business, personal, or savings routeno value-2 9 value-4 Bank routing number on check accountno value-2 12 value-4 Account number on check checkno value-2 9 value-4 Check number on the check fullmicr value-2 value-3 value-4 value-5 serialno value-2 9 value-4 check value statecode value-2 2 value-4 2 letter state code achcode value-2 value-3 value-4 value-5 transtype value-2 18 value-4 (See Transaction Type Table for Legal Values) amount value-2 12 value-4 Amount to credit (USD) client_transref value-2 20 value-4 Client-supplied transaction identifier, (i.e. receipt number) which will be passed to the credit card network for specific industry types po value-2 9 value-4 purchase order number – used in purchase card data salestax value-2 9 value-4 Decimal / purchase card data authcode value-2 6 value-4 Auth code received for Offline Transactions cashback value-2 2 value-4 This contains the amount paid as cash back to the consumer gratuity value-2 12 value-4 Amount of the charge that represents tip value value-2 value-3 value-4 value-5 allow_partial value-2 3 value-4 Contains the value “yes” or “no”. The default is “no”. When set to “yes”, an approval can occur where the approved amount is LESS than the requested amount. It is the developer’s responsibility to check the “approvedamt” field to determine allow_duplicates value-2 3 value-4 Contains the value “yes” or “no” blind_credit value-2 3 value-4 Allow a credit with no previous sale – set this to yes/no extra_credit value-2 3 value-4 Allow a credit to exceed the amount of the original sale when the gateid of an original sale/force is provided – set this to yes/no (default is no) recurring value-2 2 value-4 whether this is a recurring transaction – set to yes/no installmentcount value-2 9 value-4 Rebilling value – number of payments in this installment cycle installmentseqno value-2 9 value-4 Rebilling value – number of the installment being sent billpayment value-2 value-3 value-4 value-5 debtindicator value-2 value-3 value-4 value-5 clientip value-2 20 value-4 IP of requesting client or person clerkname value-2 20 value-4 Clerk/Salesperson Name/ID cardpresent value-2 3 value-4 Contains the value “yes” or “no” contactless value-2 value-3 value-4 value-5 send_email value-2 value-3 value-4 value-5 send_cc value-2 value-3 value-4 value-5 send_sms value-2 value-3 value-4 value-5 cc_email value-2 value-3 value-4 value-5 value value-2 value-3 value-4 value-5 - 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.
- If an API Access Credential is only authorized for a single sites, passing in the default siteid value of zero will close the currently open batch for that single site.
- If the API Access Credential is authorized for multiple sites, the SiteID must be specified to indicate which batch to close.
- If the username is set to a clientid or username other than an API Access Credential, you must specify a non-zero siteidto indicate which batch to close.
- The batchnumber should always be passed as an empty string to close the open batch. Specifying a batch number will re-close an existing batch and may result in duplicate charges.
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
- authcode
- approved
- cvv2reply
- avsreply
- gateid
- bankid
- corporatecardindicator
- invoiceno
- firstname
- lastname
- cardtype
- last4
- expmonth
- expyear
- processor_token
- approvedhsaamt
- approvedamt
Remarks
- General
- Names in name/value pairs are NOT case-sensitive
- Names inside XML tags ARE case-sensitive
- Function-Specific
- None
- Include
Method
1234function ProcessTransaction(request,callback)function ProcessTransaction(request,timeout,callback)Request
1234567891011121314request= {"username": "P7RCWAYW","transtype": "LOAD","amount": "0.00","cardnumber": "4444555566669999","expmonth": "01","expyear": "2019","cvv2": "","firstname": "","lastname": "","email": ""}Reply
12345678910111213141516171819202122232425262728293031callback ( {"reply":{"response": "Success","responsecode": 0,"description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/transact.asmx/ProcessTransaction","datablock": {"authcode": "123456","approved": "Y","cvv2reply": "","avsreply": "","gateid": 83496360,"bankid": 83496360,"corporatecardindicator": "","invoiceno": "","firstname": "","lastname": "","cardtype": "Visa","last4": "9999","expmonth": "01","expyear": "19","processor_token": "","approvedhsaamt": 0,"approvedamt": 0,"bal": null,"returncheckservicecharge": null}}} );Sample Code
1234567891011121314151617181920212223242526<script type="text/javascript" src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script type="text/javascript">SlimCD.Transact.ProcessTransaction({"username": "P7RCWAYW","transtype": "LOAD","amount": "0.00","cardnumber": "4444555566669999","expmonth": "01","expyear": "2019","cvv2": "","firstname": "","lastname": "","email": ""},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});</script>Downloads Download full sample source.
- Include
123include 'slimcd.php';
Method
123function Transact_ProcessTransaction(Transact_ProcessTransactionRequest $request,$timeout=false)
Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687class Transact_ProcessTransactionRequest{// property declarationpublic $username = '' ;public $password = '';public $metabankid = 0;public $bankid = 0;public $clientid = 0;public $siteid = 0;public $priceid = '';public $product = '';public $ver = '';public $key = 0;public $kiosk = '';public $readerpresent = '';public $contactlessreader = '';public $encryption_device = '';public $encryption_type = '';public $encryption_key = '';public $firstname = '';public $lastname = '';public $address = '';public $city = '';public $state = '';public $zip = 0;public $country = '';public $phone = 0;public $email = '';public $birthdate = '';public $driverlic = '';public $ssn = '';public $gateid = 0;public $use_pooled = '';public $processor_token = '';public $temporary_token = '';public $cardtype = '';public $corporatecard = '';public $trackdata = '';public $cardnumber = 0;public $expmonth = '';public $expyear = '';public $cvv2 = '';public $seccode = '';public $pinblockdata = '';public $pinblock = '';public $ksn = '';public $Checks = '';public $micrreader = '';public $accttype = '';public $checktype = '';public $routeno = '';public $accountno = '';public $checkno = '';public $fullmicr = '';public $serialno = 0;public $statecode = 0;public $achcode = '';public $transtype = '';public $amount = 0;public $clienttransref = '';public $po = '';public $salestaxtype = '';public $salestax = '';public $authcode = '';public $cashback = '';public $gratuity = '';public $Allow_Partial = '';public $allow_duplicates = '';public $blind_credit = '';public $extra_credit = '';public $recurring = '';public $installmentcount = '';public $installmentseqno = '';public $billpayment = '';public $debtindicator = '';public $clientip = '';public $clerkname = '';public $cardpresent = '';public $contactless = '';public $send_email = '';public $send_cc = '';public $send_sms = '';public $cc_email = '';}
JSON Reply
1234567891011121314151617181920212223242526272829{"response": "Success","responsecode": 0,"description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/transact.asmx/ProcessTransaction","datablock": {"authcode": "123456","approved": "Y","cvv2reply": "","avsreply": "","gateid": 78959492,"bankid": 78959492,"corporatecardindicator": "","invoiceno": "","firstname": "","lastname": "","cardtype": "Visa","last4": "9999","expmonth": "01","expyear": "19","processor_token": "","approvedhsaamt": 0,"approvedamt": 0,"bal": null,"returncheckservicecharge": null}}
Sample Code
1234567891011121314151617181920212223242526include 'slimcd.php';// Create a ProcessTransaction Request class$request = new Transact_ProcessTransactionRequest() ;$request->username = 1032;$request->password = 289075;$request->clientid = 1032;$request->siteid = 228226448 ;$request->priceid = 74 ;$request->transtype = 'SALE' ;$request->amount = 10.00 ;$request->cardnumber = 4111111111111111 ;$request->expmonth = 12 ;$request->expyear = 49 ;$request->product = 'MyPHP' ;$request->ver = 1.0 ;$request->key = 'SVD-072-5QQ6-5K58' ;$reply = $SlimCD->Transact_ProcessTransaction($request);if ($result->response == 'Success') {echo 'Success!' ;}else {echo $result->response . ':' . $result->description ;}
Downloads - Include
123using SlimCD;
Method
1234public ProcessTransactionReply ProcessTransaction(ProcessTransactionRequest request,int timeout);
Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081public class ProcessTransactionRequest{public string username { get; set; }public string password { get; set; }public int clientid { get; set; }public int siteid { get; set; }public int priceid { get; set; }public string key { get; set; }public string product { get; set; }public string version { get; set; }public string kiosk { get; set; }public string readerpresent { get; set; }public string contactlessreader { get; set; }public string encryption_device { get; set; }public string encryption_type { get; set; }public string encryption_key { get; set; }public string first_name { get; set; }public string last_name { get; set; }public string address { get; set; }public string city { get; set; }public string state { get; set; }public string zip { get; set; }public string country { get; set; }public string phone { get; set; }public string email { get; set; }public string birthdate { get; set; }public string driverslic { get; set; }public string ssn { get; set; }public int gateid { get; set; }public string usepooled { get; set; }public string processor_token { get; set; }public string temporary_token { get; set; }public string cardtype { get; set; }public string corporatecard { get; set; }public string trackdata { get; set; }public string cardnumber { get; set; }public string expmonth { get; set; }public string expyear { get; set; }public string cvv2 { get; set; }public string pinblockdata { get; set; }public string pinblock { get; set; }public string ksn { get; set; }public string checks { get; set; }public string micrreader { get; set; }public string accttype { get; set; }public string checktype { get; set; }public string routeno { get; set; }public string accountno { get; set; }public string checkno { get; set; }public string fullmicr { get; set; }public string serialno { get; set; }public string statecode { get; set; }public string achcode { get; set; }public string transtype { get; set; }public string amount { get; set; }public string client_transref { get; set; }public string po { get; set; }public string salestax { get; set; }public string authcode { get; set; }public string cashback { get; set; }public string gratuity { get; set; }public string allow_partial{ get; set; }public string allow_duplicates { get; set; }public string blind_credit { get; set; }public string extra_credit { get; set; }public string recurring { get; set; }public string installmentcount { get; set; }public string installmentseqno { get; set; }public string billpayment { get; set; }public string debtindicator { get; set; }public string clientip { get; set; }public string clerkname { get; set; }public string cardpresent { get; set; }public string contactless { get; set; }public string send_email { get; set; }public string send_cc { get; set; }public string send_sms { get; set; }public string cc_email { get; set; }}
Reply
123456789101112131415161718192021222324252627282930public class ProcessTransactionReply{public string response;public string responsecode;public string description;public string responseurl;public string authcode;public string approved;public string cvv2reply;public string avsreply;public string gateid;public string bankid;public string corporatecardindicator;public string invoiceno;public string firstname;public string lastname;public string cardtype;public string last4;public string expmonth;public string expyear;public string processor_token;public string approvedhsaamt;public string approvedamt;public string bal;public string returncheckservicecharge;public string senddata;public string recvdata;}
Cross Reference: ClientSample Code
123456789101112131415161718192021222324252627282930SlimCD.Transact transact = new SlimCD.Transact();transact.debug = true;transact.transURL = TransURL;transact.statsURL = StatsURL;ProcessTransactionRequest request = new ProcessTransactionRequest();ProcessTransactionReply reply = new ProcessTransactionReply();request.transType = "SALE";request.clienttransref = "12345";request.userName = "1032";request.password = "289075";request.clientID = 1032;request.siteID = 228226448;request.priceID = 74;request.cardNumber = "4444555566669999";request.expMonth = "12";request.expYear = "2015";request.cvv2 = "999";request.zip = "33324";request.amount = "1.23";reply = transact.ProcessTransaction(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}Downloads
- Include
123using SlimCD;
Method
1234public async Task ProcessTransaction(ProcessTransactionRequestrequest, int timeout);
Request
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182public class ProcessTransactionRequest{public string username { get; set; }public string password { get; set; }public int clientid { get; set; }public int siteid { get; set; }public int priceid { get; set; }public string key { get; set; }public string product { get; set; }public string version { get; set; }public string kiosk { get; set; }public string readerpresent { get; set; }public string contactlessreader { get; set; }public string encryption_device { get; set; }public string encryption_type { get; set; }public string encryption_key { get; set; }public string first_name { get; set; }public string last_name { get; set; }public string address { get; set; }public string city { get; set; }public string state { get; set; }public string zip { get; set; }public string country { get; set; }public string phone { get; set; }public string email { get; set; }public string birthdate { get; set; }public string driverslic { get; set; }public string ssn { get; set; }public int gateid { get; set; }public string usepooled { get; set; }public string processor_token { get; set; }public string temporary_token { get; set; }public string cardtype { get; set; }public string corporatecard { get; set; }public string trackdata { get; set; }public string cardnumber { get; set; }public string expmonth { get; set; }public string expyear { get; set; }public string cvv2 { get; set; }public string pinblockdata { get; set; }public string pinblock { get; set; }public string ksn { get; set; }public string checks { get; set; }public string micrreader { get; set; }public string accttype { get; set; }public string checktype { get; set; }public string routeno { get; set; }public string accountno { get; set; }public string checkno { get; set; }public string fullmicr { get; set; }public string serialno { get; set; }public string statecode { get; set; }public string achcode { get; set; }public string transtype { get; set; }public string amount { get; set; }public string client_transref { get; set; }public string po { get; set; }public string salestax { get; set; }public string authcode { get; set; }public string cashback { get; set; }public string gratuity { get; set; }public string allow_partial{ get; set; }public string allow_duplicates { get; set; }public string blind_credit { get; set; }public string extra_credit { get; set; }public string recurring { get; set; }public string installmentcount { get; set; }public string installmentseqno { get; set; }public string billpayment { get; set; }public string debtindicator { get; set; }public string clientip { get; set; }public string clerkname { get; set; }public string cardpresent { get; set; }public string contactless { get; set; }public string send_email { get; set; }public string send_cc { get; set; }public string send_sms { get; set; }public string cc_email { get; set; }}
Reply
123456789101112131415161718192021222324252627282930public class ProcessTransactionReply{public string response;public string responsecode;public string description;public string responseurl;public string authcode;public string approved;public string cvv2reply;public string avsreply;public string gateid;public string bankid;public string corporatecardindicator;public string invoiceno;public string firstname;public string lastname;public string cardtype;public string last4;public string expmonth;public string expyear;public string processor_token;public string approvedhsaamt;public string approvedamt;public string bal;public string returncheckservicecharge;public string senddata;public string recvdata;}
Cross Reference: ClientSample Code
123456789101112131415161718192021222324252627282930SlimCD.Transact transact = new SlimCD.Transact();transact.debug = true;transact.transURL = TransURL;transact.statsURL = StatsURL;ProcessTransactionRequest request = new ProcessTransactionRequest();ProcessTransactionReply reply = new ProcessTransactionReply();request.transType = "SALE";request.clienttransref = "12345";request.userName = "1032";request.password = "289075";request.clientID = 1032;request.siteID = 228226448;request.priceID = 74;request.cardNumber = "4444555566669999";request.expMonth = "12";request.expYear = "2015";request.cvv2 = "999";request.zip = "33324";request.amount = "1.23";reply = await transact.ProcessTransaction(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}Downloads
- Include
123#import "SlimCD.h"
Method
1234567typedef void (^TransactProcessTransactionReplyBlock)(TransactProcessTransactionReply *reply);- (void) transactProcessTransactionWithRequest:(TransactProcessTransactionRequest*)request replyBlock:(TransactProcessTransactionReplyBlock)replyBlock;- (void) transactProcessTransactionWithRequest:(TransactProcessTransactionRequest*)request timeout:(NSTimeInterval)timeout replyBlock:(TransactProcessTransactionReplyBlock)replyBlock;
Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192@interface TransactProcessTransactionRequest@property (strong) NSString *userName;@property (strong) NSString *password;@property (strong) NSString *transType;@property (strong) NSString *amount;@property (strong) NSString *clienttransref;@property (strong) NSString *salesTax;@property (strong) NSString *salesTaxType;@property (strong) NSString *trackData;@property (strong) NSString *allow_duplicates;@property (strong) NSString *loginName;@property (strong) NSNumber *gateID;@property (strong) NSString *cardNumber;@property (strong) NSString *expMonth;@property (strong) NSString *expYear;@property (strong) NSString *cvv2;@property (strong) NSString *zip;@property (strong) NSNumber *clientID;@property (strong) NSNumber *siteID;@property (strong) NSNumber *priceID;@property (strong) NSString *ver;@property (strong) NSString *product;@property (strong) NSString *gratuity;@property (strong) NSString *po;@property (strong) NSString *key;@property (strong) NSString *kiosk;@property (strong) NSString *readerPresent;@property (strong) NSString *contactlessReader;@property (strong) NSString *encryption_device;@property (strong) NSString *encryption_type;@property (strong) NSString *encryption_key;@property (strong) NSString *firstName;@property (strong) NSString *lastName;@property (strong) NSString *address;@property (strong) NSString *city;@property (strong) NSString *state;@property (strong) NSString *country;@property (strong) NSString *phone;@property (strong) NSString *email;@property (strong) NSString *birthdate;@property (strong) NSString *driversLic;@property (strong) NSString *ssn;@property (strong) NSString *usePooled;@property (strong) NSString *processor_token;@property (strong) NSString *temporary_token;@property (strong) NSString *cardType;@property (strong) NSString *corporateCard;@property (strong) NSString *pinBlockData;@property (strong) NSString *pinBlock;@property (strong) NSString *ksn;@property (strong) NSString *checks;@property (strong) NSString *micrReader;@property (strong) NSString *acctType;@property (strong) NSString *checkType;@property (strong) NSString *routeNo;@property (strong) NSString *accountNo;@property (strong) NSString *checkNo;@property (strong) NSString *fullMicr;@property (strong) NSString *serialNo;@property (strong) NSString *stateCode;@property (strong) NSString *achCode;@property (strong) NSString *authCode;@property (strong) NSString *cashback;@property (strong) NSString *allow_partial;@property (strong) NSString *blind_credit;@property (strong) NSString *extra_credit;@property (strong) NSString *recurring;@property (strong) NSString *installmentCount;@property (strong) NSString *installmentSeqNo;@property (strong) NSString *billPayment;@property (strong) NSString *debtIndicator;@property (strong) NSString *clientIP;@property (strong) NSString *clerkName;@property (strong) NSString *cardPresent;@property (strong) NSString *contactless;@property (strong) NSString *send_email;@property (strong) NSString *send_cc;@property (strong) NSString *send_sms;@property (strong) NSString *cc_email;@property (strong) NSString *deviceID;@property (strong) NSString *surcharge;@property (strong) NSString *pinPadPresent;@property (strong) NSString *deviceMake;@property (strong) NSString *deviceModel;@property (strong) NSString *deviceSerialNo;@property (strong) NSString *emvKernel;@property (strong) NSString *emvTags;@property (strong) NSString *emvMode;@end
Reply
12345678910111213141516171819202122232425@interface TransactProcessTransactionReply : SlimCDReply@property (strong) NSString *authCode;@property (strong) NSString *approved;@property (strong) NSString *cvv2Reply;@property (strong) NSString *avsReply;@property (strong) NSNumber *gateID;@property (strong) NSString *bankID;@property (strong) NSString *corporateCardIndicator;@property (strong) NSString *invoiceNo;@property (strong) NSString *firstName;@property (strong) NSString *lastName;@property (strong) NSString *cardType;@property (strong) NSString *last4;@property (strong) NSString *expMonth;@property (strong) NSString *expYear;@property (strong) NSString *processor_token;@property (strong) NSString *approvedHSAAmt;@property (strong) NSString *approvedAmt;@property (strong) NSString *balance;@property (strong) NSString *surcharge;@end
Sample Code
12345678910111213141516171819202122232425262728293031SlimCD *api = [[SlimCD alloc] init];TransactProcessTransactionRequest *request = [[TransactProcessTransactionRequest alloc] init];request.transType = @"SALE";request.clienttransref = @"12345";request.userName = @"1032";request.password = @"289075";request.clientID = @1032;request.siteID = @228226448;request.priceID = @74;request.cardNumber = @"4444555566669999";request.expMonth = @"12";request.expYear = @"2015";request.cvv2 = @"999";request.zip = @"33324";request.deviceID = @"DEVICE123";request.amount = @"1.23";[api transactProcessTransactionWithRequest:request replyBlock:^(TransactProcessTransactionReply *reply){if ( reply.responseCode == RC_SUCCESS ){NSLog(@"Transaction succeeded.");}else{NSLog(@"Transaction failed: %@", reply.responseDescription);}}]; - Method
1234567public void processTransaction(ProcessTransactionRequest transactProcessTransactRequest,int timeout ,ProcessTransactionCallback callback)public void processTransaction(ProcessTransactionRequest transactProcessTransactRequest,ProcessTransactionCallback callback)
Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791public class ProcessTransactionRequest {//Credentialsprivate String username;private int clientid;private String password;private int siteid;private int priceid;private String key;//Applicationprivate String product;private String version;//Hardwareprivate String kiosk;private String readerpresent;private String contactlessreader ;private String encryption_device;private String encryption_type ;private String encryption_key ;//Customerprivate String firstname;private String lastname ;private String address;private String city ;private String state;private String zip ;private String country ;private String phone;private String email;private String birthdate;private String driverslic;private String ssn;//Tokensprivate int gateid;private String usepooled;private String processor_token;private String temporary_token;//Card Dataprivate String cardtype;private String corporatecard;private String trackdata;private String cardnumber;private String expmonth;private String expyear;private String cvv2 ;private String pinblockdata ;private String pinblock ;private String ksn;//Check Dataprivate String checks;private String micrreader ;private String accttype ;private String checktype;private String routeno ;private String accountno;private String checkno;private String fullmicr;private String serialno ;private String statecode;private String achcode ;//Transactionprivate String transtype ;private String amount ;private String client_transref ;private String po ;private String salestax ;private String authcode ;private String cashback ;private String gratuity ;private String allow_partial ;private String allow_duplicates ;private String blind_credit ;private String extra_credit ;private String recurring ;private String installmentcount ;private String installmentseqno ;private String billpayment ;private String debtindicator ;private String clientip ;private String clerkname ;private String cardpresent ;private String contactless ;//Receiptprivate String send_email;private String send_cc ;private String send_sms ;private String cc_email ;public ProcessTransactionRequest() {super();// TO set the default value.username="";clientid=0;password="";siteid=0;priceid=0;key="";product="";version="";kiosk = "";readerpresent = "";contactlessreader = "";encryption_device = "";encryption_type = "";encryption_key = "";firstname = "";lastname = "";address = "";city = "";state = "";zip = "";country = "";phone = "";email = "";birthdate = "";driverslic = "";ssn = "";gateid = 0;usepooled = "";processor_token = "";temporary_token = "";cardtype = "";corporatecard = "";trackdata = "";cardnumber = "";expmonth = "";expyear = "";cvv2 = "";pinblockdata = "";pinblock = "";ksn = "";checks = "";micrreader = "";accttype = "";checktype = "";routeno = "";accountno = "";checkno = "";fullmicr = "";serialno = "";statecode = "";achcode = "";transtype = "";amount = "";client_transref = "";po = "";salestax = "";authcode = "";cashback = "";gratuity = "";allow_partial = "";allow_duplicates = "";blind_credit = "";extra_credit = "";recurring = "";installmentcount = "";installmentseqno = "";billpayment = "";debtindicator = "";clientip = "";clerkname = "";cardpresent = "";contactless = "";send_email = "";send_cc = "";send_sms = "";cc_email = "";}public int getClientid() {return clientid;}public void setClientid(int clientid) {this.clientid = clientid;}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 int getPriceid() {return priceid;}public void setPriceid(int priceid) {this.priceid = priceid;}public String getKey() {return key;}public void setKey(String key) {this.key = key;}public String getProduct() {return product;}public void setProduct(String product) {this.product = product;}public String getVersion() {return version;}public void setVersion(String version) {this.version = version;}public String getKiosk() {return kiosk;}public void setKiosk(String kiosk) {this.kiosk = kiosk;}public String getReaderpresent() {return readerpresent;}public void setReaderpresent(String readerpresent) {this.readerpresent = readerpresent;}public String getContactlessreader() {return contactlessreader;}public void setContactlessreader(String contactlessreader) {this.contactlessreader = contactlessreader;}public String getEncryption_device() {return encryption_device;}public void setEncryption_device(String encryption_device) {this.encryption_device = encryption_device;}public String getEncryption_type() {return encryption_type;}public void setEncryption_type(String encryption_type) {this.encryption_type = encryption_type;}public String getEncryption_key() {return encryption_key;}public void setEncryption_key(String encryption_key) {this.encryption_key = encryption_key;}public String getAddress() {return address;}public void setAddress(String address) {this.address = address;}public String getCity() {return city;}public void setCity(String city) {this.city = city;}public String getState() {return state;}public void setState(String state) {this.state = state;}public String getZip() {return zip;}public void setZip(String zip) {this.zip = zip;}public String getCountry() {return country;}public void setCountry(String country) {this.country = country;}public String getPhone() {return phone;}public void setPhone(String phone) {this.phone = phone;}public String getBirthdate() {return birthdate;}public void setBirthdate(String birthdate) {this.birthdate = birthdate;}public String getDriverslic() {return driverslic;}public void setDriverslic(String driverslic) {this.driverslic = driverslic;}public String getSsn() {return ssn;}public void setSsn(String ssn) {this.ssn = ssn;}public int getGateid() {return gateid;}public void setGateid(int gateid) {this.gateid = gateid;}public String getUsepooled() {return usepooled;}public void setUsepooled(String usepooled) {this.usepooled = usepooled;}public String getProcessor_token() {return processor_token;}public void setProcessor_token(String processor_token) {this.processor_token = processor_token;}public String getTemporary_token() {return temporary_token;}public void setTemporary_token(String temporary_token) {this.temporary_token = temporary_token;}public String getCardtype() {return cardtype;}public void setCardtype(String cardtype) {this.cardtype = cardtype;}public String getCorporatecard() {return corporatecard;}public void setCorporatecard(String corporatecard) {this.corporatecard = corporatecard;}public String getTrackdata() {return trackdata;}public void setTrackdata(String trackdata) {this.trackdata = trackdata;}public String getPinblockdata() {return pinblockdata;}public void setPinblockdata(String pinblockdata) {this.pinblockdata = pinblockdata;}public String getPinblock() {return pinblock;}public void setPinblock(String pinblock) {this.pinblock = pinblock;}public String getKsn() {return ksn;}public void setKsn(String ksn) {this.ksn = ksn;}public String getChecks() {return checks;}public void setChecks(String checks) {this.checks = checks;}public String getMicrreader() {return micrreader;}public void setMicrreader(String micrreader) {this.micrreader = micrreader;}public String getAccttype() {return accttype;}public void setAccttype(String accttype) {this.accttype = accttype;}public String getChecktype() {return checktype;}public void setChecktype(String checktype) {this.checktype = checktype;}public String getRouteno() {return routeno;}public void setRouteno(String routeno) {this.routeno = routeno;}public String getAccountno() {return accountno;}public void setAccountno(String accountno) {this.accountno = accountno;}public String getCheckno() {return checkno;}public void setCheckno(String checkno) {this.checkno = checkno;}public String getFullmicr() {return fullmicr;}public void setFullmicr(String fullmicr) {this.fullmicr = fullmicr;}public String getSerialno() {return serialno;}public void setSerialno(String serialno) {this.serialno = serialno;}public String getStatecode() {return statecode;}public void setStatecode(String statecode) {this.statecode = statecode;}public String getAchcode() {return achcode;}public void setAchcode(String achcode) {this.achcode = achcode;}public String getClient_transref() {return client_transref;}public void setClient_transref(String client_transref) {this.client_transref = client_transref;}public String getPo() {return po;}public void setPo(String po) {this.po = po;}public String getSalestax() {return salestax;}public void setSalestax(String salestax) {this.salestax = salestax;}public String getAuthcode() {return authcode;}public void setAuthcode(String authcode) {this.authcode = authcode;}public String getCashback() {return cashback;}public void setCashback(String cashback) {this.cashback = cashback;}public String getGratuity() {return gratuity;}public void setGratuity(String gratuity) {this.gratuity = gratuity;}public String getAllow_partial() {return allow_partial;}public void setAllow_partial(String allow_partial) {this.allow_partial = allow_partial;}public String getAllow_duplicates() {return allow_duplicates;}public void setAllow_duplicates(String allow_duplicates) {this.allow_duplicates = allow_duplicates;}public String getBlind_credit() {return blind_credit;}public void setBlind_credit(String blind_credit) {this.blind_credit = blind_credit;}public String getExtra_credit() {return extra_credit;}public void setExtra_credit(String extra_credit) {this.extra_credit = extra_credit;}public String getRecurring() {return recurring;}public void setRecurring(String recurring) {this.recurring = recurring;}public String getInstallmentcount() {return installmentcount;}public void setInstallmentcount(String installmentcount) {this.installmentcount = installmentcount;}public String getInstallmentseqno() {return installmentseqno;}public void setInstallmentseqno(String installmentseqno) {this.installmentseqno = installmentseqno;}public String getBillpayment() {return billpayment;}public void setBillpayment(String billpayment) {this.billpayment = billpayment;}public String getDebtindicator() {return debtindicator;}public void setDebtindicator(String debtindicator) {this.debtindicator = debtindicator;}public String getClientip() {return clientip;}public void setClientip(String clientip) {this.clientip = clientip;}public String getClerkname() {return clerkname;}public void setClerkname(String clerkname) {this.clerkname = clerkname;}public String getCardpresent() {return cardpresent;}public void setCardpresent(String cardpresent) {this.cardpresent = cardpresent;}public String getContactless() {return contactless;}public void setContactless(String contactless) {this.contactless = contactless;}public String getSend_email() {return send_email;}public void setSend_email(String send_email) {this.send_email = send_email;}public String getSend_cc() {return send_cc;}public void setSend_cc(String send_cc) {this.send_cc = send_cc;}public String getSend_sms() {return send_sms;}public void setSend_sms(String send_sms) {this.send_sms = send_sms;}public String getCc_email() {return cc_email;}public void setCc_email(String cc_email) {this.cc_email = cc_email;}public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getTranstype() {return transtype;}public void setTranstype(String transtype) {this.transtype = transtype;}public String getAmount() {return amount;}public void setAmount(String amount) {this.amount = amount;}public String getExpmonth() {return expmonth;}public void setExpmonth(String expmonth) {this.expmonth = expmonth;}public String getExpyear() {return expyear;}public void setExpyear(String expyear) {this.expyear = expyear;}public String getFirstname() {return firstname;}public void setFirstname(String firstname) {this.firstname = firstname;}public String getLastname() {return lastname;}public void setLastname(String lastname) {this.lastname = lastname;}public String getEmail() {return email;}public void setEmail(String email) {this.email = email;}public String getCardnumber() {return cardnumber;}public void setCardnumber(String cardnumber) {this.cardnumber = cardnumber;}public String getCvv2() {return cvv2;}public void setCvv2(String cvv2) {this.cvv2 = cvv2;}}
Reply
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168public class ProcessTransactionReply{// Response data.private String authcode;private String approved;private String cvv2reply;private String avsreply;private int gateid;private int bankid;private String corporatecardindicator;private String invoiceno;private String firstname;private String lastname;private String cardtype;private String last4;private String expmonth;private String expyear;private String processor_token;private int approvedhsaamt;private int approvedamt;private int bal;private String returncheckservicecharge;public ProcessTransactionReply() {super();// TO set the default value.authcode="";approved="";cvv2reply="";avsreply="";gateid=0;bankid=0;corporatecardindicator="";invoiceno="";firstname="";lastname="";cardtype="";last4="";expmonth="";expyear="0";processor_token="";approvedhsaamt=0;approvedamt=0;bal=0;returncheckservicecharge="";}// setters and getters.public String getAuthcode() {return authcode;}public void setAuthcode(String authcode) {this.authcode = authcode;}public String getApproved() {return approved;}public void setApproved(String approved) {this.approved = approved;}public String getCvv2reply() {return cvv2reply;}public void setCvv2reply(String cvv2repl) {this.cvv2reply = cvv2reply;}public String getAvsreply() {return avsreply;}public void setAvsreply(String avsreply) {this.avsreply = avsreply;}public int getGateid() {return gateid;}public void setGateid(int gateid) {this.gateid = gateid;}public int getBankid() {return bankid;}public void setBankid(int bankid) {this.bankid = bankid;}public String getCorporatecardindicator() {return corporatecardindicator;}public void setCorporatecardindicator(String corporatecardindicator) {this.corporatecardindicator = corporatecardindicator;}public String getInvoiceno() {return invoiceno;}public void setInvoiceno(String invoiceno) {this.invoiceno = invoiceno;}public String getFirstname() {return firstname;}public void setFirstname(String firstname) {this.firstname = firstname;}public String getLastname() {return lastname;}public void setLastname(String lastname) {this.lastname = lastname;}public String getCardtype() {return cardtype;}public void setCardtype(String cardtype) {this.cardtype = cardtype;}public String getLast4() {return last4;}public void setLast4(String last4) {this.last4 = last4;}public String getExpmonth() {return expmonth;}public void setExpmonth(String expmonth) {this.expmonth = expmonth;}public String getExpyear() {return expyear;}public void setExpyear(String expyear) {this.expyear = expyear;}public String getProcessor_token() {return processor_token;}public void setProcessor_token(String processor_token) {this.processor_token = processor_token;}public int getApprovedhsaamt() {return approvedhsaamt;}public void setApprovedhsaamt(int approvedhsaamt) {this.approvedhsaamt = approvedhsaamt;}public int getApprovedamt() {return approvedamt;}public void setApprovedamt(int approvedamt) {this.approvedamt = approvedamt;}public int getBal() {return bal;}public void setBal(int bal) {this.bal = bal;}public String getReturncheckservicecharge() {return returncheckservicecharge;}public void setReturncheckservicecharge(String returncheckservicecharge) {this.returncheckservicecharge = returncheckservicecharge;}}
Sample Code
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123// set the request parameters.ProcessTransactionRequest request=new ProcessTransactionRequest();// Credentialrequest.setUsername("P7RCWAYW");request.setPassword("2898075");request.setClientid(1032);request.setSiteid(228226448);request.setPriceid(74);request.setKey("");// Transactionrequest.setTranstype("SALE");request.setAmount("11.00");request.setClerkname("asdf");// Card datarequest.setCardnumber("4417122900000002");request.setExpmonth("12");request.setExpyear("49");// Applicationrequest.setProduct("SLIMCDAndroid");request.setVersion("1.0");request.setAllow_duplicates("");// Customerrequest.setFirstname("");request.setLastname("");request.setAddress("");request.setCity("");request.setState("");request.setZip("");request.setCountry("");request.setPhone("");request.setEmail("");request.setBirthdate("");request.setDriverslic("");request.setSsn("");// Tokensrequest.setGateid(0);request.setUsepooled("");request.setProcessor_token("");request.setTemporary_token("");// Card Data.request.setCvv2("");request.setCardtype("");request.setPinblock("");request.setPinblockdata("");request.setKsn("");request.setCorporatecard("");request.setTrackdata("");//check data.request.setChecks("");request.setMicrreader("");request.setAccttype("");request.setChecktype("");request.setRouteno("");request.setAccountno("");request.setCheckno("");request.setFullmicr("");request.setSerialno("");request.setStatecode("");request.setAchcode("");// HardWarerequest.setKiosk("");request.setReaderpresent("");request.setContactlessreader("");request.setEncryption_device("");request.setEncryption_type("");request.setEncryption_key("");// Transactionrequest.setPo("");request.setSalestax("");request.setAuthcode("");request.setCashback("");request.setGratuity("");request.setAllow_partial("");request.setBlind_credit("");request.setExtra_credit("");request.setRecurring("");request.setBillpayment("");request.setDebtindicator("");request.setClientip("");request.setContactless("");request.setCardpresent("");request.setClient_transref("");request.setInstallmentcount("");request.setInstallmentseqno("");// Receipt.request.setSend_cc("");request.setSend_email("");request.setSend_sms("");request.setCc_email("");//To make web service request.new TransactProcessTransaction().processTransaction(request,new ProcessTransactionCallback() {@Overridepublic void getProcessTransactionReply(ProcessTransactionReply reply){if (reply.getResponse().equals("Success"))textBox.setText("Success");elsetextBox.setText("There was a problem:\n" + reply.getResponse()+"\n Descriptin "+ reply.getDescription());}});
Downloads - 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.
1234567Error2request tag not found inside XMLData 0https://stats.slimcd.com/wswebservices/transact.asmx/ProcessTransactionIf 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/jsonpayment.asp
Protocols- HTTP POST
- HTTP GET
This function accepts either name/value pairs or JSON
Request
Reply
12345678910111213141516171819202122232425262728293031{"reply": {"response": "Success","responsecode": 0,"description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/transact.asmx/ProcessTransaction","datablock": {"authcode": "123456","approved": "Y","cvv2reply": "","avsreply": "","gateid": 78959492,"bankid": 78959492,"corporatecardindicator": "","invoiceno": "","firstname": "","lastname": "","cardtype": "Visa","last4": "9999","expmonth": "01","expyear": "19","processor_token": "","approvedhsaamt": 0,"approvedamt": 0,"bal": null,"returncheckservicecharge": null}}}Sample Code
Remarks
- The jsonpayment.asp entry point returns a standard datablock on approved, declined, and errors for credit card transactions, making it easier to parse for class libraries.
- The jsonscript.asp entry point can also be called with service=ProcessTransaction (or PostXML or PostHTTP), but the datablock may not contain all elements on decline or error responses
- Check and gift card transactions may return different elements in the datablock than credit card transactions