Placér dit indhold fhgfvhbher

Transaction token

Transaction token

We have another way of checking if the payment are processed using a transaction token.

There are three steps to this process:

  1. Generating the transaction token
  2. Completeing the transaction
  3. Looking up the transaction token

To get started, please look at the code example here.

TIP You can open the file with notepad, if you do not have an editor for viewing source code.

Generating the transaction token

If you run the code by uploading it to your server and navigate to the file, you are presented with a input form and a call to the API function “transaction_token_generate” is automaticly made, and is returning a transaction token back in the response. The token is important later.

 

The form looks like this:

transaction_token_form.PNG

If you’re unsure of how to fill in the input form, please look at the table below:

The “Name” column is listing the parameter names and they are case sensitive.

NameDescription
versionWhich version of the payment window that should be used. 201 is a stable version and should not be changed unless you know what you’re doing.
ccrg

Activated with the value ‘1’ and deactivated with the value ‘0’

If ccrg is turned on it will also be in the response. You need store that id from the response because you need it for rebilling, as it serves as our key to the purchasers saved credit card details.

MerchantNumberThe merchantid of the receiver
CurrencyCodeISO-4217 currency code that the payment should be paid in. For a full list of codes look here.
amountThe amount in the subunit of the selected currency to be charged on the purchasers credit card.
timeUnix timestamp of the moment of the transaction.
cartidThe orderid you want to add to the transaction.
customer_emailThe email address of the purchaser
customernameThe full name of the purchaser
accepturlThe url that the purchaser is forwarded to after the payment is complete. Normally a thank you page
langThe Language culture name for the language to use in the payment window. For a full list look here.
ShopPlatformThe platform used to pay with yourpay.

 

Completeing the transaction

When you submit the form, an iframe is created and the transaction token along with the input from the form is sent to our payment window which is embedded in the iframe.

transaction_token_iframe.PNG

The purchaser can then complete the payment.

 

Looking up the transaction token

When the payment is complete, you can make the call to our API function ‘transaction_token_lookup’ to verify that the transaction is paid. 

We recommend making this call with AJAX as soon as you make the iframe and retry every 5-10 seconds. The button call in the code example is just for simplicity.

transaction_token_step3.PNG

For this call you need to provide the following parameters:

NameDescription
tokenThe transaction token generated in step 1.
NameDescription
response‘1’ if the transaction is paid, ‘0’ otherwise.
amountthe amount charged on the purchasers credit card in the subunit of the currency
cardnoThe first six and last four digits of the card number.
tidAn id used to identify the payment
TransIDAn id used to identify the payment
orderidThe orderid you set on the transaction.
ccrgThe id used to reference saved credit card details.
tchecksumSHA1 encodeing of PaymentID & Integrationcode.
numrowsThe number of entries found in the lookup.
Was this article helpful?
Dislike 0
Views: 115
Close Menu
×
×

Cart