PayPal Automatic shipping calculation
If you're up for using an API instead of an HTML form, you can use Express Checkout. This would allow the customer to select their shipping information at PayPal first, then you can add the shipping amount after they are returned to your site and before they complete their payment. (However, with this option, they would not get the Account Optional checkout, so it wouldn't work so well if you need to use PayPal for customers who want to pay by credit card without creating an account.)
Another option would be to make your checkout create an Authorization, so that you can add on an additional amount for shipping when you Capture the payment later. To create an Authorization using Website Payments Standard, you would just need to add the variable "paymentaction" with a value of "authorization" into your HTML button code. In this case, however, you would need to make it clear to the user that you might be increasing their final total and they wouldn't have a chance to review the full amount prior to paying.
If you just want to ask for the country while they're on your website, and assign the shipping amount based on that, you can pass that country information in to the PayPal checkout using the variable "country" with the value set to the 2-character code for the country selected. You could even have the customer enter the full shipping address on your website, and pass that in to the PayPal checkout with the "address_override" variable set to "1", and that would prevent the customer from changing their shipping address once they are in the PayPal checkout process.
paypalrb
|