Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to send shipping address to Paypal Standard?

Tags:

paypal

I have looked at Paypal's HTML Variables for PayPal Payments Standard very closely and looked all over the web for an answer. And I'm pretty sure I already know the answer to my own question, but it seems too absurd. So I'm asking just to make sure I'm not missing anything.

I realize this is basically a duplicate to this question, but he was given one stupid answer.
(Update: The stupid answer has been removed, and now there is a very good answer by another user)

I am collecting the customer's billing and shipping addresses on my site. I can send the billing address, but not the shipping address to PayPal.

The reason I want to send the shipping address is to use PayPal's shipping label service.

I realize that I could set the no_shipping variable to 2 to have PayPal prompt for and require a shipping address, but I am using the address they input on my site to calculate shipping costs with USPS' API. So I need to prompt on the site, and I don't want to make the customer fill in their address a SECOND time on PayPal.

So is there a way to make this work?

I need to:

  • Calculate shipping costs
  • Print labels
  • Keep the checkout process simple and fast
like image 856
Joshua Goossen Avatar asked Oct 19 '22 19:10

Joshua Goossen


1 Answers

The document you reference does actually answer your question, although admittedly it is hard to pull out the specific answer you are looking for from all the possibilities. Look specifically here:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/#id08A6F0SJ04Y

... under the heading "Overriding Addresses Stored With PayPal."

Or at least, that is the section for passing in a shipping address for PayPal account holders. If you are using PayPal account optional then it's even more complicated, see here:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_BillingShippingAddress/#id08A9BM00A5Z

Short answer: you can't pass in two separate addresses, but the address you pass is (usually, depending upon several related variables & conditions) treated as shipping address.

Part of the reason this is so complicated is that there are so many variants of checkout flows. PayPal recommends/prefers that you let them collect the buyer's shipping (and billing, where/if required) on their page and they will pass it back to you. (And this is by far the best for PayPal accountholders since they probably have the address(es) on file already with PayPal and thus don't have to type them at all.) But PayPal knows that isn't how every merchant wants to do it so the product is flexible -- to the point of being so complex it is almost incomprehensible at times.

like image 95
geewiz Avatar answered Oct 22 '22 20:10

geewiz