Payment Gateway Compliance & Information
func cancelCallback(_ data: [String: Any]?) {
var message = ""
if let paymentGatewayInfo = data?["payment_gateway_info"] as? [String: Any],
let pgName = paymentGatewayInfo["pg_name"] as? String,
pgName == "kpay" {
message = paymentGatewayInfo["pg_response"].debugDescription
} else {
message = data?.debugDescription ?? ""
}
navigationController?.popViewController(animated: true)
let alert = UIAlertController(
title: "Cancel",
message: message,
preferredStyle: .alert
)
alert.addAction(UIAlertAction(title: "OK", style: .cancel))
self.present(alert, animated: true)
}
Function Breakdown
Android

iOS



Last updated