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

Testing: https://www.tekprocess.co.in/PaymentGateway/TransactionRequest.jsp?msg=”+strMsg

Live:
https://www.tpsl-india.in/PaymentGateway/TransactionRequest.jsp?msg=”+strMsg

Pre-requisites:

1. PHP 5 or greater
2. cUrl

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

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

Follow Screen:2.

Screen: 2

2.9. Now, look for “curl_setopt($ch,
CURLOPT_REFERER,’http://www.yourdomain.com/filename.php’);”
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.

For getcheck.php:
curl_setopt($ch, CURLOPT_REFERER,’http://www.yourdomain.com/getcheck.php’);

For response.php:
curl_setopt($ch, CURLOPT_REFERER,’http://www.yourdomain.com/Response.php’);

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.

[0] => T1234 [Biller Id]
[1] => 1 [Transaction ID]
[2] => 00
[3] => NA
[4] => 1 [Amount]
[5] => 470 [Bank code]
[6] => NA
[7] => NA
[8] => INR
[9] => NA
[10] => NA
[11] => NA
[12] => NA
[13] => 18-07-2011 10:12:18 [Timestamp]
[14] => 0399 [Could be 0300/0399] 0300: Success transaction. 0399: Failed transaction.
[15] => NA
[16] => 1 [Market code]
[17] => 1 [Account Number]
[18] => NA
[19] => NA
[20] => NA
[21] => NA
[22] => NA
[23] => NA
[24] => NA
[25] => 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

getcheck.php:
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.

Response.php:
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.

MerchantDetails.properties:
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)

Parameter
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
DD-MM-YYYY HH:MM:SS
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.

Annexure 03:

AUTHSTATUS Status Reason Proposed Transaction
“0300” Success Successful Transaction
“0399” Invalid Authentication at Bank Cancel Transaction

Test Account

BillerId=T1234
ResponseUrl=http://www.yourdomain.com/Response.php
CRN=INR
CheckSumKey=1234567890ABCDEFG
CheckSumGenUrl=https://www.tekprocess.co.in/PaymentGateway/CheckSumRequest
TPSLUrl=https://www.tekprocess.co.in/PaymentGateway/TransactionRequest.jsp

integration of the TechProcess payment gateway, indian payment gateway integration, techprocess test account, live account of techprocess

6 COMMENTS

  1. I am really enjoying the theme/design of your blog.
    Do you ever run into any web browser compatibility issues?
    A number of my blog audience have complained about
    my site not working correctly in Explorer but looks great in Safari.

    Do you have any ideas to help fix this issue?

  2. Hi there, Υou have done a great job. I’ll certainly digg it and personally suggest to my friends. I am confident they will be benefited from this site.

  3. It’s awesome to visit this web page and reading the views of all mates regarding this paragraph, while I am also zealous of getting experience.

LEAVE A REPLY

Please enter your comment!
Please enter your name here