【问题标题】:BrainTree DropIn credit card exampleBrainTree DropIn 信用卡示例
【发布时间】:2019-06-07 04:20:24
【问题描述】:

我正在尝试使用 DropIn UI 将 BrainTree 与 ios 集成。

我成功展示了 UI 和当我使用测试卡时
电话:4111111111111111
有效期:09/2020
它显示消息 "请检查您的信息并重试"

let request =  BTDropInRequest()
    request.amount = "100"
    request.paypalDisabled = true
    request.shouldMaskSecurityCode = true

    let dropIn = BTDropInController(authorization: tokenizationKey, request: request)
    { (controller, result, error) in
        if (error != nil) {
            print("ERROR = \(error?.localizedDescription ?? "")")
        } else if (result?.isCancelled == true) {
            print("CANCELLED")
        } else if let result = result {
            print("Payment Description = \(result.paymentDescription)")
            print("paymentOptionType = \(result.paymentOptionType)")
            print("paymentMethod = \(result.paymentMethod?.type ?? "")")
            print("isCancelled = \(result.isCancelled)")
            // Use the BTDropInResult properties to update your UI
            //   result.paymentOptionType = .
        }
        controller.dismiss(animated: true, completion: nil)
    }
    viewController.present(dropIn!, animated: true, completion: nil)

这是我点击添加卡时的日志

-canOpenURL:URL 失败:“com.venmo.touch.v2://x-callback-url/vzero/auth” - 错误:“此应用不允许查询方案 com.venmo.touch。 v2"
TIC TCP 连接失败 [25:0x28008b3c0]:12:8 Err(-65554)
任务 . HTTP 加载失败(错误代码:-1003 [12:8])
任务 . 以错误结束 - 代码:-1003
TIC TCP 连接失败 [26:0x2800889c0]:12:8 Err(-65554)
任务 . HTTP 加载失败(错误代码:-1003 [12:8])
任务 . 完成错误 - 代码:-1003
[BraintreeSDK] 警告无法刷新分析事件:找不到具有指定主机名的服务器。

【问题讨论】:

  • 错误日志似乎表明您无法连接到 Braintree,看起来它正在被抛出 here。如果您在我链接的代码块中设置断点,您可以检查并发布该错误消息吗?

标签: ios braintree


【解决方案1】:

当我切换到模拟器时,沙盒似乎无法在真实设备上运行,添加信用卡详细信息后请求成功。

切换到生产环境后也存在同样的问题,经过几次尝试后,我将 iPhone 设备的连接从 Wifi 更改为 LTE,并且成功了!看来我的 ISP 没有用于生产 Braintree 后端的 DNS

【讨论】:

    猜你喜欢
    • 2020-06-05
    • 1970-01-01
    • 2015-10-14
    • 2019-11-24
    • 2020-02-03
    • 2019-06-22
    • 2021-02-10
    • 2017-10-01
    • 2020-02-01
    相关资源
    最近更新 更多