This sample kit is ready to be deployed and tested.
- Copy the pythonKit folder(according to your python version) into the root folder of your server (like /var/www/html)
- Mandatory Step: For each test transaction, please change the value of the parameter "ORDER_ID" in the test.cgi file.
The pythonKit folder has the following files:
- CheckSum.py – This file has the logic for checksum generation and verification.
- test.cgi – This file will initiate the sample test transaction through the Paytm gateway. Paytm parameters need to be added in this file.
- response.cgi – This file has the logic for processing PG response after the transaction processing.
- generate_checksum_by_str : For generating the checksum
- verify_checksum_by_str : For verifing the checksum
- Create an array with key value pair of following paytm parameters (MID, ORDERID, TXNTYPE, REFUNDAMOUNT, TXNID, REFID)
- To generate checksum, call the following method. This function returns the checksum as a string. generate_refund_checksum(param_dict, merchant_key, salt=None)