I'm doing an IOS Application with Patym SDK, Transaction is happening successful but its not navigating back to app. Its showing an webview with " Redirect back to app ". anyone faced this issue before ?
Here is my code:
extension ShippingViewController : PGTransactionDelegate {
func didCancelTrasaction(_ controller: PGTransactionViewController!) {
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "confirmViewController") as! confirmViewController
self.present(vc, animated: true, completion: nil)
}
func didFinishedResponse(_ controller: PGTransactionViewController!, response responseString: String!) {
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "confirmViewController") as! confirmViewController
self.present(vc, animated: true, completion: nil)
}
func errorMisssingParameter(_ controller: PGTransactionViewController!, error: Error!) {
print(error)
showAlert(title: "didCancelTrasaction", message: error.localizedDescription)
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "CSWhoopsView") as! CSAlertViewController
self.present(vc, animated: true, completion: nil)
}
func didFailTransaction(_ controller: PGTransactionViewController!, error: Error!, response: [AnyHashable : Any]!) {
print(error)
showAlert(title: "Transaction Failed", message: error.localizedDescription)
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "CSWhoopsView") as! CSAlertViewController
self.present(vc, animated: true, completion: nil)
}
func didCancelTransaction(_ controller: PGTransactionViewController!, error: Error!, response: [AnyHashable : Any]!) {
showAlert(title: "Transaction Cancelled", message: error.localizedDescription)
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "CSWhoopsView") as! CSAlertViewController
self.present(vc, animated: true, completion: nil)
}
func didFinishCASTransaction(_ controller: PGTransactionViewController!, response: [AnyHashable : Any]!) {
print("my response isis :" )
print(response)
showAlert(title: "cas", message: "")
}
func didSucceedTransaction(_ controller: PGTransactionViewController!, response: [AnyHashable : Any]!) {
print("my response is :" )
print(response)
showAlert(title: "Transaction Successfull", message: NSString.localizedStringWithFormat("Response- %@", response) as String)
let vc = UIStoryboard(name: "account", bundle: nil).instantiateViewController(withIdentifier: "confirmViewController") as! confirmViewController
self.present(vc, animated: true, completion: nil)
}
}