Post by rewolff » Mon Aug 16, 2021 3:22 pm

Hi,
My client spotted that paypal didn't show the "region/state" field when he paid for his order and went through trouble pointing this out to me.
This is simply that this field is never added to the data passed on to paypal. Not sure if paypal has a field that fits, have not yet researched that.

That said: While researching this I saw a more urgent issue. The address passed to paypal is the "payment address". That sounds right, but isn't. When there is a dispute about an item you get paypal's support with them paying for the item when it gets lost and you shipped it to the address provided to paypal at the time of the purchase.

Of course I realize this is a tricky problem. Some people might depend on the paypal invoice, and that is supposed to show the payment-address....

DId I report already that if you pass address_override=0 in the paypal button, then paypal does not record the address it is passed? You are out-of-luck with a claim in case the address provided to opencart doesn't match what paypal has. Even when what paypal has is "nothing" (You didn't ship to the address we have on file, you're out of luck).

I'm using 2.0.3.1, so things might be fixed in later versions.

If the location hasn't been changed, you can find the offending code in: ./catalog/view/theme/default/template/payment/pp_standard.tpl for the address_override that should be =1. And ./catalog/controller/payment/pp_standard.php around line 76 has the code that processes the payment address into the data-passed-to-paypal.

Newbie

Posts

Joined
Tue Jun 09, 2015 9:19 pm

Post by ADD Creative » Mon Aug 16, 2021 4:41 pm

For state see. https://github.com/opencart/opencart/pull/9487

The payment address and no_shhiping is sent to PayPal for a couple of reasons. Not all orders will have a shipping address. Allowing a customer to be able to change the shipping address in PayPal can cause problems as this address is not passed back to OpenCart. Any store owner who ships to the OpenCart address could end up shipping to the wrong address.

For the latest changes for this see.
https://github.com/opencart/opencart/is ... -804115195

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Steven787 » Mon Aug 23, 2021 12:24 pm

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
Last edited by Steven787 on Tue Aug 24, 2021 11:42 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jun 03, 2021 2:41 pm

Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by dgmode » Thu Jan 27, 2022 2:37 pm

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.

Newbie

Posts

Joined
Thu Jan 27, 2022 2:34 pm

Post by ADD Creative » Thu Jan 27, 2022 8:01 pm

If you set address_override=1 it should stop PayPal from allowing the customer to change the shipping address. Just make sure you are sending the full shipping address and not the payment address.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 15 guests