I am trying to integrate the Paytm Payment Gateway using API.
I've added .net 4.5 paytm.dll from their git project into my asp.net API project targeting .net framework 4.7
with this I've created checkup using below code:
String merchantKey = "hNIXDAclG8Li#D5X";
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("MID", "aTSCQu39976373303724");
parameters.Add("CHANNEL_ID", "WEB");
parameters.Add("INDUSTRY_TYPE_ID", "Retail");
parameters.Add("WEBSITE", "WEBSTAGING");
parameters.Add("CUST_ID", "CUST_01");
parameters.Add("ORDER_ID", "o_1234");
parameters.Add("TXN_AMOUNT", "100.00");
parameters.Add("CALLBACK_URL", "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=o_1234");
String paytmChecksum = CheckSum.generateCheckSum(merchantKey, parameters);
using generated checksum, I'm trying to create payment like with below API call and JSON object in POSTMAN. https://securegw-stage.paytm.in/link/create
{
"body": {
"mid": "aTSCQu39976373303724",
"linkType": "INVOICE",
"linkDescription": "Test Payment",
"linkName": "Test",
"sendSms": false,
"sendEmail": false
},
"head": {
"tokenType": "AES",
"signature": "lQWs6oOwK/hEpmfPN9x5GMLUe5pFpcIKdnIYQeDHT5csnul3H1RMsPfCyOQcTXB9FccSsFTbmi5R6S/BUjWCFFcjWxqgdF+jhSFY9uALLqo="
}
}
But it response with the below error
{
"head": {
"version": "v2",
"timestamp": "06/06/2020 17:56:31",
"channelId": null,
"signature": null,
"tokenType": null,
"clientId": null
},
"body": {
"resultInfo": {
"resultStatus": "FAILED",
"resultCode": "5028",
"resultMessage": "Checksum provided is invalid."
}
}
}
Can anybody have solution to this problem? Thank you in advance. Pardon me for bad grammar.