I am integrating paytm payment gateway in php.
I am passing all the required parameters properly to generate checksum code,
After hitting the curl, i am getting a system error issue in response.
we have tried to contact payment regarding this, but they are not much responding regarding this issue, So i am on my own.
Below i have mentioned my code, If anyone came across this issue before, Help me out to solve this prob
Checksum Code:
Kp+cPIrrZDweulOb3kEsYxMB4h3fJCtTOuT//bhEeJ3fpxIa1rvb6OfT5icCOkANyR4XCzbwhpaCrLCtGWDf/27BA06dSORyJnbqdAj8FKg=
Serverside code
$encFile = PaytmChecksum::generateSignature($arrInputs,$mid);
$paytmParams["head"] = array(
"signature" => $encFile
);
$post_data = json_encode($paytmParams, JSON_UNESCAPED_SLASHES);
$url = "https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=$mid&orderId=$transactionId";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
$headers[] = 'X-Redirect-Url: http://localhost/TEWebSite/web/site/paymentresponse';
$response = curl_exec($ch);
Initiate Transaction Response:
{"head":{"requestId":null,"responseTimestamp":"1607942634809","version":"v1"},"body":{"extraParamsMap":null,"resultInfo":{"resultStatus":"U","resultCode":"00000900","resultMsg":"System error"}}}
3
Answers
my sample.php file which is working fine may you got your problem
In my case i was using old mid, mkey. And didn’t get proper error message. It just showed "System Error". After changing it with the right mid, key it worked.
I also faced this same issue in my node project but after conversion with paytm my problem solved .
They ask you to give your mid and after that they will reset you mid and it will work again properly
——This is response i get from paytm developers—
The given staging MID-MID has been migrated and should now function as expected. Please retest the transaction after 1 hour.
Please let us know if you are having any problems so that we can connect with you as soon as possible.