gpt4 book ai didi

ios - 本地与国际运输(PayPal iOS SDK)

转载 作者:可可西里 更新时间:2023-11-01 02:58:17 24 4
gpt4 key购买 nike

我正在使用 PayPal iOS SDK 在我的应用程序中处理付款。有没有办法区分美国境内的运输和国际运输?

这是我目前所拥有的:

NSDecimalNumber *subtotal = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", self.product.price]];
NSDecimalNumber *shipping = [[NSDecimalNumber alloc] initWithString:@"12.00"];

PayPalPaymentDetails *paymentDetails = [PayPalPaymentDetails paymentDetailsWithSubtotal:subtotal withShipping:shipping withTax:nil];

NSDecimalNumber *total = [subtotal decimalNumberByAdding:shipping];

payment.intent = PayPalPaymentIntentSale;
payment.amount = total;
payment.currencyCode = @"USD";

谢谢。

最佳答案

您需要在您的应用中指定一种方法来确定送货地址,并确定该地址相对于您的送货地点是否是“国际”地址。

来自 the docs :

Your code...

Instructs the PayPal iOS SDK to display an app-provided Shipping Address and/or the Shipping Addresses already associated with the user's PayPal account.

The PayPal iOS SDK...

Allows the user to examine and choose from the displayed Shipping Address(es).Adds the chosen Shipping Address to the payment information sent to PayPal's servers.

然后您可以将国际费用作为最终费用的一部分。
(您还想让用户知道您打算收取国际运费)

关于ios - 本地与国际运输(PayPal iOS SDK),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30513796/

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