Order_id在iOS swift4中的Paytm集成中无效 [英] Order_id is invalid in Paytm Integration in iOS swift4
本文介绍了Order_id在iOS swift4中的Paytm集成中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
swift4中的Paytm集成: 响应为交易完成,响应消息为无效的订单ID ,但是我在每次交易中都生成新的订单ID,是否有任何可能的解决方案. 我要传递的参数:
Paytm Integration in swift4: The response is Transaction Finished and the response message is Invalid order id but I'm generating order id new at every transaction, is there any possible solution for this. Parameter which I'm passing :
var orderID = "123456789".randomString(length: 20)
orderDict["MID"] = "RentSe98692194807190"
orderDict["CHANNEL_ID"] = "WAP"
orderDict["INDUSTRY_TYPE_ID"] = "Retail"
orderDict["WEBSITE"] = "APP_STAGING"
orderDict["TXN_AMOUNT"] = "100"
orderDict["ORDER_ID"] = orderID
orderDict["CHECKSUMHASH"] = checksumHash
orderDict["CUST_ID"] = "240"
orderDict["EMAIL"] = "kj@gmail.com" as AnyObject
orderDict["MOBILE_NO"] = "7777777777" as AnyObject
orderDict["REQUEST_TYPE"] = "DEFAULT" as AnyObject
orderDict["THEME"] = "merchant" as AnyObject
orderDict["CALLBACK_URL"] = "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp" as AnyObject
推荐答案
//MARK:- Create Payment
func createPayment(checksumHash : String, orderID : String) {
var custID = ""
var orderID = String()
custID = custID.randomString(length: 20)
print(custID)
var orderDict = [AnyHashable : Any]()
let txnAmt = ((self.amountTextField.text) ?? "0")
print(txnAmt)
orderDict["MID"] = "RentSe98692194807190"
orderDict["CHANNEL_ID"] = "WAP"
orderDict["INDUSTRY_TYPE_ID"] = "Retail"
orderDict["WEBSITE"] = "APP_STAGING"
orderDict["TXN_AMOUNT"] = txnAmt as AnyObject
orderDict["ORDER_ID"] = orderID
orderDict["CHECKSUMHASH"] = checksumHash
orderDict["CUST_ID"] = custID
orderDict["EMAIL"] = "kj@gmail.com" as AnyObject
orderDict["MOBILE_NO"] = "7777777777" as AnyObject
orderDict["REQUEST_TYPE"] = "DEFAULT" as AnyObject
orderDict["THEME"] = "merchant" as AnyObject
orderDict["CALLBACK_URL"] = "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp" as AnyObject
print(custID)
let pgOrder = PGOrder(params: orderDict)
let transaction = PGTransactionViewController.init(transactionFor: pgOrder)
if eServerTypeStaging != eServerTypeNone {
transaction!.serverType = eServerTypeStaging
transaction!.merchant = merchant
transaction!.delegate = self
self.present(transaction!, animated: true, completion: {
})
}
}`
这篇关于Order_id在iOS swift4中的Paytm集成中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文