Paypal and calculating international shipping?
Does anyone have advice on how 开发者_如何学Goone can calculate shipping to a foreign country with PayPal? I am developing in PHP.
-JT
PayPal is an online payment processing company, not a shipping company. To calculate shipping costs you'll need to work with the API of a shipping provider. Each provider has their own API:
UPS: https://www.ups.com/upsdeveloperkit?loc=en_US
USPS: http://www.usps.com/webtools/
FedEx: http://fedex.com/us/developer/
DHL: http://www.dhl-usa.com/xml/index.asp
One way to handle shipping is to use the Instant Update API. Basically, you provide PayPal with a callback (web service) that calculates shipping when users are reviewing payment on PayPal's site.
精彩评论