【发布时间】:2021-06-15 06:10:46
【问题描述】:
我是 swift 新手,我正在实施 Cash Free Api,其流程是这样的
https://dev.cashfree.com/payment-gateway/integrations/mobile-integration/ios
但我在展示 CFViewController 时遇到问题,它显示警告
Attempt to present <CFSDK.CFViewController> on <UINavigationController> whose view is not in the window hierarchy!
我的代码是这样的
CFPaymentService().doWebCheckoutPayment(
params: self.getPaymentParams(),
env: "PROD",
callback: self)
虽然参数是
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": ""
]
}
请帮忙!
【问题讨论】: