GetTemporaryToken
- Method
SlimCD.Transact.GetReceipt
Purpose
Retrieves a plain-text receipt.Description
GetReceipt returns a content-type of text/plain that contains the data for the receipt. If an error occurs, GetReceipt sets the HTTP status code and status text to represent the error. If successful, the status code is set to 200 and the text for the receipt is returned as the body of the response.
Business RulesArgument List
Name Required Usage GetTemporaryTokenRequest 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
GetTemporaryToken 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 require 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
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
12345function GetTemporaryToken(request,callback)function GetTemporaryToken(request,timeout,callback)
Request
12345678910111213141516171819{"username": "P7RCWAYW","cardnumber": "4444555566669999","expmonth": "01","expyear": "2019","cvv2": "","trackdata": "","pinblockdata": "","pinblock": "","ksn": "","cardtype": "","ebt": "","contactless": "","encryption_device": "","encryption_type": "","encryption_key": ""}
Reply
123456789101112131415161718callback ( {"reply": {"response": "Success","responsecode": 0,"description": "","responseurl": "/wswebservices/GetTemporaryToken.asp","datablock": {"cardtype": "V","last4": "9999","expmonth": "01","expyear": "2019","temporary_token": "39B8C2284EB4124A18F484E6FDDDEFB616024868"}}} );
Sample Code
123456789101112131415161718<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script>// <![CDATA[SlimCD.Sessions.GetReceipt({"username": "R6UT8C6M","password": "","gateid": "78022528"},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});// ]]></script>
Downloads