我正在使用一个iOS应用程序,我必须集成 Paytm ,但我无法使用旧SDK(PGSDK_VERSION @“2.1”)完成此任务。它正在运行但是新的更新SDK(PGSDK_VERSION @“2.7”)显示缺少参数:
func Pay_btn_Action(_ sender:UIButton!) {
var orderDict = [String : AnyObject]()
orderDict["MID"] = "WorldP64425807474247" as AnyObject
orderDict["CHANNEL_ID"] = "WAP" as AnyObject
orderDict["INDUSTRY_TYPE_ID"] = "Retail" as AnyObject
orderDict["WEBSITE"] = "worldpressplg" as AnyObject
orderDict["TXN_AMOUNT"] = "100" as AnyObject
orderDict["ORDER_ID"] = ViewController.generateOrderIDWithPrefix("") as AnyObject
orderDict["REQUEST_TYPE"] = "DEFAULT" as AnyObject
orderDict["CUST_ID"] = "1234567890" as AnyObject
orderDict["EMAIL"] = "kj@gmail.com" as AnyObject
orderDict["MOBILE_NO"] = "8877877802" as AnyObject
let order = PGOrder(params: orderDict)
print(order ?? "nil")
let transactionController = PGTransactionViewController.init(transactionFor: order)
transactionController? .serverType = eServerTypeStaging
transactionController? .merchant = merchantConfig
transactionController? .delegate = self
self.showController(transactionController!)
}
它就在这里:
func errorMisssingParameter(_ controller: PGTransactionViewController!, error: Error!) {
print("Parameters")
self.removeController(controller)
}
我正在使用这些网址:
merchantConfig?.checksumGenerationURL = "https://pguat.paytm.com/paytmchecksum/paytmCheckSumGenerator.jsp"
merchantConfig?.checksumValidationURL = "https://pguat.paytm.com/paytmchecksum/paytmCheckSumVerify.jsp"
答案 0 :(得分:0)
你可以试试这个
吗? orderDict["MID"] = "WorldP64425807474247"
//Merchant configuration in the order object
orderDict["CHANNEL_ID"] = "WAP"
orderDict["INDUSTRY_TYPE_ID"] = "Retail"
orderDict["WEBSITE"] = "worldpressplg"
orderDict["THEME"] = "merchant"
orderDict["EMAIL"] = "kj@gmail.com"
orderDict["MOBILE_NO"] = "8877877802"
//Order configuration in the order object
orderDict["TXN_AMOUNT"] = "100"
orderDict["ORDER_ID"] = ViewController.generateOrderIDWithPrefix("")
orderDict["CUST_ID"] = "1234567890"
let order: PGOrder = PGOrder(params: orderDict)