Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Shipping address is not sent to paypal #119

Open
joemsak opened this issue Jan 22, 2013 · 2 comments
Open

Shipping address is not sent to paypal #119

joemsak opened this issue Jan 22, 2013 · 2 comments

Comments

@joemsak
Copy link

joemsak commented Jan 22, 2013

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

@jdevine
Copy link

jdevine commented Feb 2, 2013

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? :)

@krtschmr
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants