我想将paytm
支付网关与swift 3.0
我集成.我只需按照github
链接.但我有问题["CHECKSUMHASH"]
="".我能把这个钥匙放进去.
orderDict["MID"] = strMid
orderDict["ORDER_ID"] = strOrderId
orderDict["CUST_ID"] = strCustomerId
orderDict["INDUSTRY_TYPE_ID"] = strIndustryType
orderDict["CHANNEL_ID"] = strChanalID
orderDict["TXN_AMOUNT"] = strAmt
orderDict["WEBSITE"] = strWebsite
orderDict["CALLBACK_URL"] = "http://xxxxx.co.in/verifyChecksum.php"
orderDict["CHECKSUMHASH"] = ""
Run Code Online (Sandbox Code Playgroud)
这给了我无效的校验和,请告诉我如何生成校验和.
首先,您可以调用服务器api来生成校验和.如果您正在使用,Almofire
那么请致电
var parameters:[String:String]?
parameters = ["MID":strMid,"ORDER_ID":strOrderId ,"INDUSTRY_TYPE_ID":strIndustryType,"CHANNEL_ID":strChanalID,"TXN_AMOUNT":strAmt,"WEBSITE":strWebsite, "CUST_ID":strCustomerId,"CALLBACK_URL":"http://xxxxxxx.co.in/verifyChecksum.php"]
showHud(self.view)
print(parameters)
Alamofire.request("http://xxxxxx.co.in/generateChecksum.php", method: .post, parameters: parameters,encoding: URLEncoding.default, headers: nil).responseJSON {}
Run Code Online (Sandbox Code Playgroud)
请通过这个api 全部 parameter
.它在下面给出response
{
"CHECKSUMHASH": "xxxxxxxxxxxxx",
"ORDER_ID": "xxxxxxxx",
"payt_STATUS": "1"
}
Run Code Online (Sandbox Code Playgroud)
在这里Dictionary
你得到CHECKSUMHASH
它通过paytm order
.
归档时间: |
|
查看次数: |
3059 次 |
最近记录: |