spree_paypal_express
spree_paypal_express copied to clipboard
Shipping address is not sent to paypal
Hi!
When you fill in a shipping address different from the billing address, it is not used in the Paypal screens anywhere.
On the "Final" Paypal screen, you see your shipping address before clicking to return to the site, and it is actually the Billing Address
Looking into the Checkout Controller Decorator, it looks like there is only one [:address] option, so there doesn't appear to be a way to submit them both to PayPal
Our client is saying this is confusing their customers, and I am desperate for a solution here!
This is not resolved by unchecking the "No Shipping" checkbox in the Admin Payment Options configuration... that option actually causes your Logged-In-Paypal-Account's shipping address to OVERWRITE the Shipping Address used during Spree Checkout.
Thanks for your time & consideration, guys <3
I was trying to debug a similar situation, which was apparently caused by me trying to allow both paypal checkout from the cart, and as a payment method on my payment page.
In line 29 of spree/checkout_controller_decorator.rb:
def paypal_payment
load_order
opts = all_opts(@order, params[:payment_method_id], 'payment')
if payment_method.preferred_cart_checkout
opts.merge!(shipping_options)
else
opts.merge!(address_options(@order))
end
The address_options call is what puts the shipping address into the payload to paypal. So if you have the "cart checkout" option checked on your paypal payment_method in the spree admin configuration page, paypal won't get the shipping address sent (because the assumption is you're going to skip the address steps if you're going to paypal straight from the cart.)
So double check that's not checked on your payment method.
Now my next problem is that when I get to the confirmation page after paypal, the ship_to name is changed from the original ship to name to the paypal user name. I'll start debugging that one tomorrow, unless anyone has a quick answer for that? :)
+1