This post payment gateway provided by TechProcess solutions Ltp modules for opencart
Checksum Document for PHP
Transaction Detail Checksum Facility
On Payment Gateway
Provided By TechProcess Solutions Ltd
TPSL has checksum facility for providing security at transaction time. This is one of the types of integration we have. In this type of integration, TPSL will provide API to the merchant, what they have to deploy at their end. A checksum value will be generated using this API. Please find the below mentioned detailed process.
Process for Checksum
1. Merchant has to deploy the API given by TPSL at their end.
2. All the necessary request parameter will be send to this API.
3. This API will generate a checksum value.
4. At the request time this checksum value will come to TPSLâ€™s end with request parameter as per Annexure 01.
5. When request will reach TPSLâ€™s side TPSL will once again generate the checksum value using the request parameter received from the Merchant.
6. If the value of the checksum matches at both the end, then the transaction will be forwarded to the respective bank.
7. Once TPSL receives the response from the bank, TPSL generate checksum value with the response parameter that will be sent to the merchant.
8. Once TPSL send the response to the merchant along with the checksum value, merchant will generate checksum using the response parameter received from TPSL.
9. If checksum value matches at merchant side using API then that transaction will return as a Transaction Success. After that to check auth status as per annexure 03:If auth status=0300 is for success transaction or auth status=0399 is for failed transactions
10. If checksum mismatches, that transaction will be considered as Failed/Fraud transaction.
Technical Process Flow:
01. Merchant has to share the request URL (From which the transaction request will come) with TPSL.TPSL will configure the same at TPSL end and validate transaction time for security purpose.
02. Merchant can hit the below URL for Transaction Processing
1. PHP 5 or greater
1. Step 1: Files and Directory Verification
1.1. Please make sure total 5 files are provided to you. (Request.php, getcheck.php,
1.2. Response.php, keystoretekp.pem and MerchantDetails.properties)
1.3. Make sure these files are placed under same directory except MerchantDetails.properties.
1.4. It is not compulsory to place files under directory provided by Techprocess.
1.5. Please assure following values are available inside MerchantDetails.properties file.
1.5.1. BillerId= [Represent the Merchant ID provided by TPSL.]
1.5.2. ResponseUrl= [Represent the Response URL of merchant.]
1.5.3. CRN= [Currency.]
1.5.4. CheckSumKey= [Unique key provided by TPSL.]
1.5.5. CheckSumGenUrl= [URL provided by TPSL.]
1.5.6. TPSLUrl= [TPSL Payment gateway URL.]
Step 2: Implementation
2.1. Make sure MerchantDetails.properties file is not accessible from browser.
2.2. For testing default URL will be present for â€œTPSLUrl=â€ in MerchantDetails.properties file.
2.3. You can change this URL once you get the new URL from TPSL for Live Transactions.
2.4. Change the following in MerchantDetails.properties with the details TPSL have provided.
2.5. Make sure there should not be any spaces at the beginning and the end of each value of
2.6. MerchantDetails.properties. Follow Screen:1
2.7. Copy Request.php, getcheck.php, Response.php, and keystoretekp.pem to the desired directory.
2.8. Open getcheck.php and change the Property file path to the path where you have placed your property file. Make a similar change in Response.php
2.9. Now, look for â€œcurl_setopt($ch,
line and change the URL to where your getcheck.php and Response.php file is placed. Make sure you replace the filename.php with the respected file names. e.g.
3. Step 3: Important things to remember.
3.1 Do not modify â€œkeystoretekpâ€ file.
3.2 Do not modify any code in any of the file.
3.3 To get response values, you can check â€œResponse.phpâ€ file. Do not bypass any of the procedure from â€œResponse.phpâ€ file.
3.4 Under response.php you will get following array once the transaction done.
 => T1234 [Biller Id]
 => 1 [Transaction ID]
 => 00
 => NA
 => 1 [Amount]
 => 470 [Bank code]
 => NA
 => NA
 => INR
 => NA
 => NA
 => NA
 => NA
 => 18-07-2011 10:12:18 [Timestamp]
 => 0399 [Could be 0300/0399] 0300: Success transaction. 0399: Failed transaction.
 => NA
 => 1 [Market code]
 => 1 [Account Number]
 => NA
 => NA
 => NA
 => NA
 => NA
 => NA
 => NA
 => 292697030925
3.4 Please remember integration will be handled in two ways.
a) Test server transaction.
b) Live server transaction.
For both types you need to perform configuration in same files/fields which are provided to you.
Request.php: Do not require any kind of configuration.
getcheck.php: Configuration required.
Response.php: Configuration required.
MerchantDetails.properties: Configuration required.
Keystoretekp.pem: Do not require any kind of configuration.
Configuration Required in Files Revised for both types
i. Set property file path.
ii. Set curl_opt REFERER path to your domain name.
iii. Set curl_opt CURLOPT_CAINFO path to the certificate which is provided to you. Please note Test and Live certificates are different.
iv. Set property file path.
v. Set curl_opt REFERER path to your domain name.
vi. Set curl_opt CURLOPT_CAINFO path to the certificate which is provided to you. Please note Test and Live certificates are different.
vii. Change BillerID to the one provided to you.
viii. Change Responseurl to the one where your Response.php file is located.
ix. Change CheckSumKey to the one which is provided to you.
x. Change CheckSumGenUrl when Live URL is provided to you.
xi. Change TPSLUrl when Live URL is provided to you.
For more details related to Request and Response please refer Annexure.
Annexure 01: Checksum Request Parameter (From Merchant to TPSL)
Sample Value Size Type Description
Transaction Id 1234556 8 (string) Mandatory MERCHANT unique reference number
Market Code 1234 10 (String) Mandatory Extra information from merchant for product details with alphanumeric plus â€˜_â€™
Account No 123-334444 OR
1 200 (String) Mandatory It will be account number of customer provided by MERCHANT or if MERCHANT donâ€™t want to pass account no then they need to pass constant value as 1.
Payment Amount 500.00 8 Mandatory It will be transaction amount
Bank Code 300 5 (String) Mandatory It will be bank Code as per Annexure 08.
Property file path D:\TechProcess\Property\MerchantDetails_T1199.properties 150 (String) Mandatory Merchant needs to pass the complete or relative path of the property file residing in the system.
Annexure 02: Checksum Response Parameter (From TPSL to Merchant)
Parameter Sample Value Size Type Description
MERCHANT ID L123 6 Character MERCHANT id provided by TPSL to MERCHANT.
CustomerID 9871234567 20 varchar MERCHANT unique transaction id.
TxnreferenceNo NA NA NA TPSL unique transaction ID
BankReferenceNo NA NA NA Banks unique transaction ID.
TxnAmount 700 15 Varchar Transaction Amount provided by MERCHANT (SRC AMT field in TPSL system).
BankID 300 3 Numeric Bank Id provided by TPSL.
BankMERCHANTID NA NA NA It will be MERCHANT id of MERCHANT provided by bank (provided by bank). For rest banks, it will be â€œNAâ€.
TxnType NA NA NA This will be â€œNAâ€ always.
Currency Name INR 3 Varchar This will be â€œINRâ€ always.
Item Code NA NA NA This will be â€œNAâ€ always.
Security Type NA NA NA This will be â€œNAâ€ always.
Security ID NA NA NA This will be â€œNAâ€ always.
Security Password NA NA NA This will be â€œNAâ€ always.
TxnDate Date 20 Date Format DD-MM-YYYY HH:MM:SS Time and date at which TPSL sends response. Format is
Auth Status Refer Annexure 03
Settlement Type NA NA NA This will be â€œNAâ€ always.
AdditionalInfo1 7072006 20 Varchar This will be market code.
AdditionalInfo2 102-102976395 100 Varchar This will be account number.
AdditionalInfo3 NA NA Date This will be â€œNAâ€ always.
AdditionalInfo4 NA NA Varchar This will be â€œNAâ€ always.
AdditionalInfo5 NA NA Varchar This will be â€œNAâ€ always.
AdditionalInfo6 NA NA Varchar This will be â€œNAâ€ always.
AdditionalInfo7 NA NA Varchar This will be â€œNAâ€ always.
ErrorStatus NA NA NA This will be â€œNAâ€ always
Error Description NA or xxx 100 NA or Varchar This will be either â€œNAâ€ or respective error messages.
CheckSum 123456789 50 Varchar This will be unique checksum number as per logic.
Note: Checksum that are generated is 12 digit number.
AUTHSTATUS Status Reason Proposed Transaction
“0300” Success Successful Transaction
“0399” Invalid Authentication at Bank Cancel Transaction
integration of the TechProcess payment gateway, indian payment gateway integration, techprocess test account, live account of techprocess