Post by ernestboutique » Thu Feb 27, 2014 5:34 pm

Hello everyone,
I have been adjusting some of the code in the PayPal standard files in a 1.5.6 installation. The problems we were having were that:
1. The opencart billing address was being sent to PayPal, instead of the shipping address.
2. After being transferred to the PayPal web site, the customer seemed to be able to change the shipping address to something else.
Both of the above problems can cause problems with PayPal Seller Protection unless we double check PP and opencart addresses for each order and contact the customer about any discrepancy.
So, as a fix I have changed the code in catalog/controller/payment/pp_standard.php to:
$this->data['first_name'] = html_entity_decode($order_info['shipping_firstname'], ENT_QUOTES, 'UTF-8');
$this->data['last_name'] = html_entity_decode($order_info['shipping_lastname'], ENT_QUOTES, 'UTF-8');
$this->data['address1'] = html_entity_decode($order_info['shipping_address_1'], ENT_QUOTES, 'UTF-8');
$this->data['address2'] = html_entity_decode($order_info['shipping_address_2'], ENT_QUOTES, 'UTF-8');
$this->data['city'] = html_entity_decode($order_info['shipping_city'], ENT_QUOTES, 'UTF-8');
$this->data['zip'] = html_entity_decode($order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8');
$this->data['country'] = $order_info['shipping_iso_code_2'];
Then I also changed the code in catalog/view/theme/default/template/payment/pp_standard.tpl
<input type="hidden" name="address_override" value="1" />
It seems to be working, but can anyone foresee any problems with this, particularly as the billing address is no longer being passed to PayPal (I assume)?
Thanks in advance :)


Posts

Joined
Wed Oct 30, 2013 5:10 pm

Post by artgarcia » Fri Feb 26, 2016 2:44 am

Hi ernestboutique! How your mod works for keep ypu seller protection active? I have this problem when my opencart was upgraded from 1.5.6 to 2.0.3.1

Which version are you currently use?

Thanks for your help!

Newbie

Posts

Joined
Mon Dec 05, 2011 8:59 am

Post by indiesms » Fri May 06, 2016 2:08 am

I have this issue with OpenCart 2.1.0.2 its not sending shipping address (Does paypal use "shipping" address instead of delivery address or payment address? Would this fix work for the current release? Also orders are going into missing, do I need to make a change within the paypal account? Paypal standard is the extension I am using and the office lady is getting angry because she can't just click print shipping label as she did with woocommerce and wordpress (we switched to opencart because the site just needs a simple shopping cart people can order from.

Newbie

Posts

Joined
Tue May 03, 2016 11:45 pm

Post by ADD Creative » Mon May 09, 2016 6:14 pm

The change should work in OpenCart 2.1.0.2. A good Idea would be to try it on a test install of your site with the PayPal sandbox.

www.add-creative.co.uk


Active Member

Posts

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

Users browsing this forum: No registered users and 5 guests