I'm using the PayPal iOS SDK to handle payments in my app. Is there a way to differentiate between shipping within the U.S. and international shipping?
This is what I have so far:
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";
Thanks.
You'll need to specify in your app a way to determining the shipping address and decide if that address is "international" relative to your shipping location.
From 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.
You could then include an international charge as part of the final fee.
(You'd also want to make the user aware of your intent to charge for international shipping)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With