Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shipping POST variables on Paypal Website Payments Standard Checkout

What are the correct shipping POST variables for Paypal Website Payments Standard Checkout?

I've spent many hours getting shipping somewhat working on Paypal Website Payments Standard Checkout. Actually I'm using IPN as well, but that's not relevant to this, which is about getting the shipping and handling charges from my cart to show up on the paypal checkout and replace the paypal shipping calculator.

Things I've found out:

  • To have it recognise that your cart's shipping/handling should override its calculator, go to the merchant account profile, set up at least one shipping method (profile > selling preferences > shipping calculation) and tick the box that says "use shipping fee in the transaction instead..." [btw how to find that has changed and is no longer well documented].
  • The variables you should have in your POST (from the paypal button on your site) are documented here BUT the documentation is WRONG about "handling" which should be called "handling_cart".
  • The docs are also wrong about "shipping" which I can't find the right name for. I've got a workaround: although the docs say you can't upload per-item shipping when you're doing a whole cart upload [cmd = "_cart"], you actually can. So my work around is to set shipping_x equal to zero for all items except the first, and put the whole shipping charge on the first item, ie: shipping_1 = <shipping cost>

So I hope that helps someone who comes after. And I hope Paypal gets their act together on the docs, that's a whole big waste of time that I had.

But apart from that - is there a better way to do the shipping? What SHOULD that variable be called if not "shipping" and not "shipping_cart"? And is there an up-to-date doc anywhere?

like image 615
Djehuty Avatar asked Nov 05 '22 11:11

Djehuty


1 Answers

The 'handling' parameter works for this. It will actually be displayed as something like "Shipping & Handling" on PayPal's checkout page.

like image 185
surj Avatar answered Nov 15 '22 11:11

surj