Possible bug with Paypal Standard Integration in 1.5.1?
Posted: Tue Nov 22, 2011 10:19 am
So, I started using Paypal Standard, but noticed that billing information was not being properly populated to PayPal once my customers left my cart to pay at PayPal. They were being forced to enter their billing address again...
Long story short, I tracked this all down to the "state" not being sent to PayPal standard with the rest of their billing address information, so PayPal viewed it as being in "invalid format" and left all those fields blank.
Here's what I did to fix it for 1.5.1:
In /catalog/controller/payment/pp_standard.php (around line 53), after
ADD
Then, in /catalog/view/theme/default/template/payment/pp_standard.tpl (around line 31), after
ADD
This has allowed PayPal Standard to now recognize my customer's billing address and relieves them of having to enter it twice.
Hopes this helps someone else!
Long story short, I tracked this all down to the "state" not being sent to PayPal standard with the rest of their billing address information, so PayPal viewed it as being in "invalid format" and left all those fields blank.
Here's what I did to fix it for 1.5.1:
In /catalog/controller/payment/pp_standard.php (around line 53), after
Code: Select all
$this->data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8');
Code: Select all
$this->data['state'] = html_entity_decode($order_info['payment_zone_code'], ENT_QUOTES, 'UTF-8');
Code: Select all
<input type="hidden" name="city" value="<?php echo $city; ?>" />
Code: Select all
<input type="hidden" name="state" value="<?php echo $state; ?>" />
Hopes this helps someone else!