Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let merchantConfig = PGMerchantConfiguration.default()
- merchantConfig?.checksumGenerationURL = "http://api.myserver.io/generate_checksum" // Not the actual url
- merchantConfig?.checksumValidationURL = "http://api.myserver.io/verify_checksum" // Not the actual url
- var orderParams: [String: String] = [:]
- // Merchant config
- orderParams["MID"] = "SreeTr69744841387208"
- orderParams["CHANNEL_ID"] = "WAP"
- orderParams["INDUSTRY_TYPE_ID"] = "Retail"
- orderParams["WEBSITE"] = "APP_STAGING"
- // Order config
- orderParams["TXN_AMOUNT"] = "1.00"
- orderParams["ORDER_ID"] = "1499926963"
- orderParams["CALLBACK_URL"] = "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp"
- orderParams["REQUEST_TYPE"] = "DEFAULT"
- orderParams["CHECKSUMHASH"] = "BLkX0WUJ2TCnb54xz0IhLEZU9gYi2N21XNkinbrRQXv5s+LLjF+UiOYkpB1ccrR6YbhQtk71TRPd5Pvz1KeUZKraaCCr6ovzmYSxEV0d8GQ=" // From Server
- orderParams["CUST_ID"] = "1234567890"
- let order: PGOrder = PGOrder(params: orderParams)
- PGServerEnvironment.selectServerDialog(self.view) { serverType in
- let transactionController = PGTransactionViewController.init(transactionFor: order)
- transactionController?.serverType = serverType
- transactionController?.merchant = merchantConfig
- transactionController?.delegate = self
- transactionController?.loggingEnabled = true
- if let vc = transactionController {
- self.present(vc, animated: true, completion: nil)
- } else {
- log.error("vc could not be initialised")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement