【发布时间】:2020-12-19 05:22:04
【问题描述】:
我正在 php 中集成 paytm 支付网关。 我正在正确传递所有必需的参数以生成校验和代码, 打卷曲后,我收到一个系统错误问题作为响应。 我们已尝试就此联系付款,但他们对此问题没有太多回应,所以我一个人。
下面我提到了我的代码,如果有人以前遇到过这个问题,请帮我解决这个问题
校验码:
Kp+cPIrrZDweulOb3kEsYxMB4h3fJCtTOuT//bhEeJ3fpxIa1rvb6OfT5icCOkANyR4XCzbwhpaCrLCtGWDf/27BA06dSORyJnbqdAj8FKg=
服务器端代码
$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);
发起事务响应: {"head":{"requestId":null,"responseTimestamp":"1607942634809","version":"v1"},"body":{"extraParamsMap":null,"resultInfo":{"resultStatus":" U","resultCode":"00000900","resultMsg":"系统错误"}}}
【问题讨论】:
-
你终于让它工作了吗
-
是的,在生成校验和时发现问题,我与 Paytm 团队验证,在生成校验和时在变量中添加引号后发现引号中的问题。成功了