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:
Then I also changed the code in catalog/view/theme/default/template/payment/pp_standard.tpl$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'];
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)?<input type="hidden" name="address_override" value="1" />
Thanks in advance
