简体   繁体   中英

Paypal Express Checkout shipping calculation with cURL

I'm attempting to implement a shopping cart on my website that is hosted through third-party hosting so I don't have the APIs or other requirements installed to be able to use PHP, so I am using PHP to execute cURL calls instead.

I need to calculate shipping costs for my items, but I'm not sure how to make that happen with the setup I have. I know PayPal has a shipping calculator, is it not possible to use that? If not, how can I set up shipping costs without having access to the APIs?

I have been pointed toward the Instant Update API , but I don't have a way to install the APIs to use it. Is there another way?

First of all, the shipping calculator inside PayPal Profile applies only to Website Payment Standards(buy now,add to cart etc) . For making API calls with Express checkout, you need to send few parameters in your CURL API request.

You need to pass PAYMENTREQUEST_n_SHIPPINGAMT in your CURL request.Available variables .

PS You don't need any special permission to make API calls.Just PHP+CURL will do.

Ex CURL to the below URL: https://api-3t.paypal.com/nvp?&user=xxxxxxxxxx&pwd=xxxxxxxxxx&signature=xxxxxxxxxx&version=70.0&METHOD=SetExpressCheckout&RETURNURL=http://www.paypal.com/test.php&CANCELURL=http://www.paypal.com/test.php&PAYMENTACTION=Sale&AMT=50&CURRENCYCODE=USD&PAYMENTREQUEST_n_SHIPPINGAMT=5.00

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM