craftcms / commerce-paypal-checkout

PayPal Checkout gateway for Craft Commerce.
https://plugins.craftcms.com/commerce-paypal-checkout
MIT License
5 stars 10 forks source link

Paypal offers option to change shipping address #4

Closed keyurshah closed 4 years ago

keyurshah commented 5 years ago

When i select the top PayPal yellow button, I get the login screen for paypal.

It seems that in Paypal, it lets you change the shipping address. But if you do change it in Paypal, it's not reflected in the Craft Commerce order. This would be confusing for the customer.

It would be preferable for the address not to be changed at all in Paypal. And leave Craft Commerce as the source of truth since shipping has already been calculated based on the original address. Hopefully that is a setting that can be added.

Original address selected upon payment

image

image

Address options presented in Paypal

image

Address changed in Paypal

image

Final order shows original address.

image

nfourtythree commented 5 years ago

In the request we are passing SET_PROVIDED_ADDRESS https://github.com/craftcms/commerce-paypal-checkout/blob/1a79b8064aec397a63b72912fa3e00dd63fc273c/src/gateways/Gateway.php#L493

Which according to the PayPal docs should lock down the editing of the shipping address:

SET_PROVIDED_ADDRESS. Use the merchant-provided address. The customer cannot change this address on the PayPal site.

This seems like it could be an issue with the PayPal sandbox.

Edit: having said that, it looks like there is a typo in our code, an s on the end of shipping_preference

keyurshah commented 4 years ago

I tried updating to live and still got the option to change address.

image

i just saw the note about the typo, hopefully that will fix it.

nfourtythree commented 4 years ago

Hi @keyurshah, I have pushed a new release that fixes this typo.

Thanks for the heads up on the issue