本地与国际航运(PayPal iOS SDK)

chr*_*oya 9 paypal ios

我正在使用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";
Run Code Online (Sandbox Code Playgroud)

谢谢.

Dan*_*yle 2

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

来自文档

你的代码...

指示 PayPal iOS SDK 显示应用程序提供的送货地址和/或已与用户的 PayPal 帐户关联的送货地址。

PayPal iOS SDK...

允许用户检查并从显示的送货地址中进行选择。将选择的送货地址添加到发送到 PayPal 服务器的付款信息中。

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