[英]Integrate Paytm with swift 3.0
I want to integrate paytm
payment gateway with swift 3.0
.I just follow github
link . 我想将
paytm
支付网关与swift 3.0
集成。我只需按照github
链接 。 but i have probelm in ["CHECKSUMHASH"]
= "" . 但我在
["CHECKSUMHASH"]
=“”中有问题。 What can i put in this key. 我能把这个钥匙放进去。
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"] = ""
This gives me invalid checksum please tell me how can i generate checksum. 这给了我无效的校验和,请告诉我如何生成校验和。
First of all you can call your server api for generate checksum. 首先,您可以调用服务器api来生成校验和。 If you are using
Almofire
then call 如果您正在使用
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 {}
Please pass all parameter
in this api . 请传递此api中的所有
parameter
。 It gives below response
它给出了以下
response
{
"CHECKSUMHASH": "xxxxxxxxxxxxx",
"ORDER_ID": "xxxxxxxx",
"payt_STATUS": "1"
}
In this Dictionary
you get CHECKSUMHASH
It Pass into paytm order
. 在这本
Dictionary
你得到CHECKSUMHASH
它传递给paytm order
。
要在swift you app中集成PayTm,您可以在github上找到此链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.