gpt4 book ai didi

ios - 调试苹果支付消息支付请求无效:

转载 作者:可可西里 更新时间:2023-11-01 02:13:35 25 4
gpt4 key购买 nike

我的应用程序实现了 Apple Pay,并成功显示了某些卡(如 boon 虚拟卡)的付款表。使用我的个人信用卡(法国信用卡),付款请求无效。

我的代码:

 let paymentRequest = PKPaymentRequest()
paymentRequest.merchantIdentifier = "merchant.com.<companyName>"
paymentRequest.requiredBillingAddressFields = [.name]
if #available(iOS 10.0, *) {
paymentRequest.supportedNetworks = PKPaymentRequest.availableNetworks()
} else {
paymentRequest.supportedNetworks = [.masterCard, .visa, .amex]
}
paymentRequest.countryCode = "FR"
paymentRequest.currencyCode = "EUR"
paymentRequest.paymentSummaryItems = booking.charges.flatMap {
PKPaymentSummaryItem(label: $0.label, amount: $0.amount, type: .pending)
} + [PKPaymentSummaryItem(label: LanguageManager.get(key: "__app_name"), amount: booking.total.amount, type: .pending)]
if let paymentAuthorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest) as PKPaymentAuthorizationViewController? {
paymentAuthorizationViewController.delegate = self
self.present(paymentAuthorizationViewController, animated: true, completion: nil)
}

paymentAuthorizationViewControllernil我得到了一个控制台日志 Payment request is invalid: <private>

我怎样才能调试它并知道这个神秘的 <private> 背后是什么? ?

最佳答案

您要收取的总金额是否为 0?看起来是这样,但我不确定。您不能有零金额的付款请求,它至少需要大于零。您仍然可以将摘要项目标记为待定,并且不会向用户显示金额。

关于ios - 调试苹果支付消息支付请求无效: <private>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40017578/

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