5

我想将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"] = ""

这给了我无效的校验和请告诉我如何生成校验和。

4

2 回答 2

5

首先,您可以调用您的服务器 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 {}

请在这个 api 中传递所有内容。 parameter它在下面给出response

{
  "CHECKSUMHASH": "xxxxxxxxxxxxx",
  "ORDER_ID": "xxxxxxxx",
  "payt_STATUS": "1"
}

在这个Dictionary你得到CHECKSUMHASH它传递到paytm order

于 2017-04-07T05:44:28.023 回答
1

要将 PayTm 集成到您的应用程序中,您可以在 github 上找到此链接。

于 2018-05-30T17:54:33.087 回答