I am new in swift and I am Implementing Cash Free Api Whose process is like this
https://dev.cashfree.com/payment-gateway/integrations/mobile-integration/ios
But I am facing problem while presenting CFViewController it is showing warning
Attempt to present <CFSDK.CFViewController> on <UINavigationController> whose view is not in the window hierarchy!
My code is like this
CFPaymentService().doWebCheckoutPayment(
params: self.getPaymentParams(),
env: "PROD",
callback: self)
While Parameter are
func getPaymentParams() -> Dictionary<String, Any> {
return [
"orderId": OrderIdForCashFree,
"appId": CashFreeAPIKeyFromServer,
"tokenData" : cftoken,
"orderAmount": AmountExpectedforServer,
"customerName": customerNameCashFree,
"orderNote": orderNoteCashFree,
"orderCurrency": "INR",
"customerPhone": customerPhoneCashFree,
"customerEmail": customerEmailCashFree,
"notifyUrl": ""
]
}
Please Help!