gpt4 book ai didi

checksum - 支付宝 : Invalid Checksum RespCode : 330

转载 作者:行者123 更新时间:2023-12-04 17:38:11 28 4
gpt4 key购买 nike

我们正在通过 Phonegap 构建安卓混合应用程序。使用 PayTm 网络集成工具包。

正确生成校验和。但是,当提交表单进行付款时,会返回 **Invalid Checksum ** 问题。

最佳答案

https://developer.paytm.com/docs/api/initiate-transaction-api/?ref=payments

NOTE: Create the signature using the body parameter of the request inthe same sequence as you pass in the request.

例子:

body = {"mid":"MIDHERE","websiteName":"WEBSTAGING","orderId":"ORDERIDHERE","txnAmount":{"value":"10.00","currency":"INR"},"userInfo":{"custId":"CUSTOMERID_HERE"},"callbackUrl":"https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=ORDERID","requestType":"Payment"}

创建json

json_body = body.to_json

#RUBY ON RAILS https://github.com/paytm/Paytm_Ruby_Checksum

generated_signature = PaytmChecksum.new.generateSignature(json_body, MERCHANT_KEY_HERE)

curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=MID HERE&orderId=ORDERID_HERE' \
--header 'Content-Type: application/json' \
--data '{"body":{"requestType":"Payment","mid":MID_HERE,"websiteName":"WEBSTAGING","orderId":ORDER_ID_HERE,"txnAmount":{"value":"10.00","currency":"INR"},"userInfo":{"custId":CUSTOMER_ID},"callbackUrl":"https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=ORDER_ID_HERE"},"head":{"signature": generated_signature}}'

正如您所指出的,我在创建签名(校验和)时使用的顺序与在请求正文参数中使用的顺序相同。

关于checksum - 支付宝 : Invalid Checksum RespCode : 330,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55709065/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com