我在我的项目中使用PayFort IOS SDK
,方法是按照此处的文档:https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_Integration_Guide_v_2.8.pdf
在5.3中达到了第4步......我收到了这个错误:
***由于未捕获的异常终止应用程序' NSInvalidArgumentException',原因:' - [UITextField setFloatingLabelActiveTextColor:]:无法识别的选择器发送到实例0x103026600'
我的代码是:
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let payFort = PayFortController.init(enviroment: KPayFortEnviromentSandBox)
let request = NSMutableDictionary.init()
request.setValue("1000", forKey: "amount")
request.setValue("AUTHORIZATION", forKey: "command")
request.setValue("USD", forKey: "currency")
request.setValue("email@domain.com", forKey: "customer_email")
request.setValue("en", forKey: "language")
request.setValue("112233682686", forKey: "merchant_reference")
request.setValue("token" , forKey: "sdk_token")
payFort?.callPayFort(withRequest: request, currentViewController: self,
success: { (requestDic, responeDic) in
print("success")
}, canceled: { (requestDic, responeDic) in
print("canceled")
},
faild: { (requestDic, responeDic, message) in
print("faild")
})
// Do any additional setup after loading the view, typically from a nib.
}
我错过了什么或做错了什么?
答案 0 :(得分:0)
我遇到了同样的问题,从评论中,我发现解决方案归结于UITextField的实现不佳,payfort sdk以前不是该文件。现在,我创建了一个示例项目,您可以从here
获得该项目https://github.com/naveedahmad99/PayfortPaymentDemo-iOS
视频演示:https://github.com/naveedahmad99/PayfortPaymentDemo-iOS/blob/master/Screenshot/demo_shot.gif