0

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.
}

我错过了什么或做错了什么?

4

1 回答 1

0

我遇到了同样的问题,从评论中,我发现解决方案是由于 UITextField 实施不佳,payfort sdk 以前不是那个文件。现在,我创建了一个示例项目,您可以从这里获取该项目

https://github.com/naveedahmad99/PayfortPaymentDemo-iOS

视频演示:https ://github.com/naveedahmad99/PayfortPaymentDemo-iOS/blob/master/Screenshot/demo_shot.gif

在此处输入图像描述

于 2018-09-05T06:42:38.990 回答