The integration is quite simple and involves basically creating two pages at your end. The first page is your Checkout page and the second page is the Redirect URL to which we will send your Customer back. Follow the below mentioned steps to integrate your website with TrillionPay.com:-
- From the Integration Kit, upload the code pertaining to your platform.
- In your Checkout page you will need to create a Form that will pass the following values to the TrillionPay server -
- FORM ACTION
Since you are integrating your website for the first time you will start with the Test Integration Interface, which will allow you to test various responses from our side, without having to actually charge or transfer any amount. Therefore, the action URL to be used is the Test URL given below. Later, when you are switched to Live mode you can change the ACTION to the Live URL
Test Mode -
http://secure.trillionpay.com/transecuteicici/icicicredit/payprocesstest.php3
Live Mode -
http://secure.trillionpay.com/transecuteicici/icicicredit/payprocess.php3
- FORM METHOD: GET/POST
- FORM VARIABLES:
toid - is the unique Member ID assigned to you during signup
description - the Unique Order Number generated by you for this Order
redirecturl - the URL to which the Customer will be sent back once the transaction is completed.
amount - the US Dollar [USD] equivalent of the amount being transacted
checksum - a numeric Checksum calculated using the data being sent and the key to ensure data integrity. The checksum is calculated using functions that we have supplied in a functions file. For example, if you are using PHP3 for your development, then include the supplied functions.php3 file in your code and make a call to the function in your code as exemplified in checkout.php3.
totype - is a fixed constant string you need to send. Its value will be transecute.
fromtype - is the Payment Option the Customer chooses for payment. You need to pass icicicredit as the value of this variable since TrillionPay uses the services of its Acquiring Bank - SBM Bank.
- In your Redirect URL Page you will need to process the parameters we pass it. The page that the customer returns to after the transaction is over must be a dynamic page to which TrillionPay passes its variables as a Query-String. This URL on your Server to which the customer is redirected once the transaction is over is known as the Redirect URL, and its purpose is to ascertain whether the transaction was successful or not and accordingly display an appropriate message to the customer as well as perform necessary database updates and notifications at your end depending on the outcome of the transaction. The following parameters are passed to this page as a Query-String:
desc - Unique Order Number of this transaction that was generated by the Merchant in the beginning of the transaction and sent to TrillionPay
amount - Amount of the transaction
status - This can be either Y or N. A Y signifies that the transaction went through Successfully and that the amount has been collected. A N on the other hand signifies that the transaction Failed.
newchecksum - The Checksum calculated for the above parameters using the Key. This Checksum has to be verified by the Merchant to ensure that the data received is indeed sent by TrillionPay and not tampered along the way.
The status and the desc variables are all that are really important as they tell you whether the transaction was successful or not. So depending on the status variable an appropriate message maybe displayed and a flag set in the database as to whether this order is to be delivered or not. However, to ensure security and prevent tampering of data it is essential to send a Checksum calculated at our end and to verify the same at your end.
Status of the Transaction = Delivery
You can simply verify the Checksum by calling a function in the supplied functions file. For instance, if you are using PHP to write your application you may refer to the supplied redirecturl.php3 for an example on how you may verify the checksum. This is achieved by calling the verifychecksum function in the associated functions file. The verifychecksum function will return true if the Checksum is valid and will return false if the Checksum is invalid.
VerifyChecksum Result = Exchange Authenticity