Installation
The demo payment page files can be downloaded here. There are 2 files included in the download:
File | Detail |
---|---|
3ds2DemoPaymentPage.html | Example payment page integrated with TxShield 3DS SDK. Do not use in production environments as it exposes sensitive information. |
md5.js | Third party JavaScript file used to create the hash, used in the validation and authorization of your calls to the 3DS SDK. |
These files are intended for you to copy into the same directory on your webserver and be able to run directly from there.
Configuration
Once on the webserver all you have to do is update the 3ds2DemoPaymentPage.html
file with the configuration values that we supply. The variables in the demo payment page are surrounded with {{ variable }} and both the name, and {{}}
should be replaced, as per below.
3DS Server URL Updates
{{txshield_3ds_url}}
: the URL of the server to connect to for 3ds2 authorization. It needs to be updated in 2 places. Assuming the URL we provide is https://myauthserver.com
.
Default Values | Updated Values |
---|---|
<script src="{{txshield_3ds_url}}/js/3d2integrator.v3.dist.js"></script> | <script src="https://myauthserver.com/js/3d2integrator.v3.dist.js"></script> |
let shieldUrl = '{{txshield_3ds_url}}'; | let shieldUrl = 'https://myauthserver.com'; |
Authentication Updates
Two further updates need to be made to the Site ID and Rcode. This will allow authorization to connect to the TxShield 3DS SDK.
{{txshield_3ds_sid}}
is the Site ID (sid) we provide to you, the equivalent of a username. If we provide you a sid of 808, then:
Default Value | Updated Value |
---|---|
let shield3dsSid = '{{txshield_3ds_sid}}'; | let shield3dsSid = '808'; |
{{txshield_3ds_rcode}}
is the rcode we provide to you, equivalent to a password. If we provide you a rcode of '598950057acc2dd9df729a5ed4b9750a7c03bbec', then:
Default Value | Updated Value |
---|---|
let shield3dsRcode = '{{txshield_3ds_rcode}}'; | let shield3dsRcode = '598950057acc2dd9df729a5ed4b9750a7c03bbec'; |
Do not expose your production SID or Rcode publicly
A Site ID (SID) and Retailer Code (rcode) are the equivalent to your username and password, or API authorization key.
You should now be able to run the demo payment page file. For details of test cards please contact support and we will provide you with the details of test cards that can be used for your solution.