gpt4 book ai didi

ios - 如何从 Braintree iOs SDK 获取 nonce

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:58:15 28 4
gpt4 key购买 nike

我正在尝试从 Braintree 获取随机数。我没有找到任何文档 Braintree 提供了如何在以下文档中从 Braintree SDK 获取随机数。

https://developers.braintreepayments.com/start/hello-client/ios/v4

请告诉我如何从 Braintree iOs SDK 获取随机数

最佳答案

您可以使用 drop in 方法获取付款随机数 让 nonce = result.paymentMethod!.nonce

例子:-

func showDropIn(clientTokenOrTokenizationKey: String) {
let request = BTDropInRequest()
let dropIn = BTDropInController(authorization: clientTokenOrTokenizationKey, request: request)
{ (controller, result, error) in
if (error != nil) {
print("ERROR")
} else if (result?.isCancelled == true) {
print("CANCELLED")
} else if let result = result {

let nonce = result.paymentMethod!.nonce

print( nonce)

}
controller.dismiss(animated: true, completion: nil)
}
self.present(dropIn!, animated: true, completion: nil)
}

关于ios - 如何从 Braintree iOs SDK 获取 nonce,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35199248/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com