我正在快速集成PayUmoney IOS SDK,遇到麻烦时,我在进行实时显示哈希值不匹配(Hash mismatch1)如果我正在测试其显示无效的商家密钥(无效的密钥),我在这里碰到了从2个星期起做那么多事情,并且没有得到任何解决方案,这对任何人都可以帮到忙。下面是我的代码,谢谢您。
注意:我只想在payUmoney内置UI下进行集成 控制器。我不想集成到UIWebView中。
self.paymentDict = PUMTxnParam()
self.paymentDict.phone = "\(userdetails["userphone"] ?? "")"
self.paymentDict.email = "\(userdetails["useremail"] ?? "")"
self.paymentDict.amount = "\(self.priceLBL.text!)"
self.paymentDict.environment = PUMEnvironment.production
self.paymentDict.firstname = "\(userdetails["username"] ?? "")"
self.paymentDict.key = "TfTP2FUf"
self.paymentDict.merchantid = "1234567"
self.paymentDict.txnID = "\(Int(NSDate().timeIntervalSince1970 * 1000))"
self.paymentDict.surl = "https://www.payumoney.com/mobileapp/payumoney/success.php"
self.paymentDict.furl = "https://www.payumoney.com/mobileapp/payumoney/failure.php"
self.paymentDict.productInfo = "iphoneX"
self.paymentDict.udf1 = ""
self.paymentDict.udf2 = ""
self.paymentDict.udf3 = ""
self.paymentDict.udf4 = ""
self.paymentDict.udf5 = ""
self.paymentDict.udf6 = ""
self.paymentDict.udf7 = ""
self.paymentDict.udf8 = ""
self.paymentDict.udf9 = ""
self.paymentDict.udf10 = ""
然后,我从服务器那里获取哈希值,并在其中传递参数并获得哈希值的响应。
self.paymentDict.hashValue = value["payment_hash"] as! String
PlugNPlay.presentPaymentViewController(withTxnParams: self.paymentDict, on: self) { (paymentResponse, error, extrapara) in
print(paymentResponse?.description ?? "")
print(error ?? "")
}
然后,运行应用程序以及何时下达产品订购,然后转到payUmoney付款控制器并显示以下错误。