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: {
})
}
}`