Page 1 of 1

Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Tue Nov 22, 2011 10:19 am
by mfive
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

Code: Select all

$this->data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8');
ADD

Code: Select all

$this->data['state'] = html_entity_decode($order_info['payment_zone_code'], ENT_QUOTES, 'UTF-8');
Then, in /catalog/view/theme/default/template/payment/pp_standard.tpl (around line 31), after

Code: Select all

<input type="hidden" name="city" value="<?php echo $city; ?>" />
ADD

Code: Select all

<input type="hidden" name="state" value="<?php echo $state; ?>" />
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!

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Mon Dec 05, 2011 12:12 pm
by notaprogrammer
Thank you - major help!

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Mon Dec 05, 2011 12:15 pm
by mfive
notaprogrammer wrote:Thank you - major help!
NP, glad I was able to help someone else!

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Wed Jun 13, 2012 2:18 am
by waterfi
Thanks! Huge help!

I also changed the billing variables to shipping as mentioned in other forums.

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Wed Jun 13, 2012 2:41 am
by mfive
waterfi wrote:Thanks! Huge help!

I also changed the billing variables to shipping as mentioned in other forums.
Glad you got it working.

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Fri Jun 15, 2012 12:34 am
by kgkaraoke
mfive wrote: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

Code: Select all

$this->data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8');
ADD

Code: Select all

$this->data['state'] = html_entity_decode($order_info['payment_zone_code'], ENT_QUOTES, 'UTF-8');
Then, in /catalog/view/theme/default/template/payment/pp_standard.tpl (around line 31), after

Code: Select all

<input type="hidden" name="city" value="<?php echo $city; ?>" />
ADD

Code: Select all

<input type="hidden" name="state" value="<?php echo $state; ?>" />
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!
Open Source: You get NOTHING for NOTHING.

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Tue Jun 26, 2012 12:40 pm
by fmcjq
to mfive,
Thank you so much ! ! ! :)

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Fri Sep 14, 2012 1:26 am
by garuda
This works great, thanks for the fix!

Re: Possible bug with Paypal Standard Integration in 1.5.1?

Posted: Thu Jul 06, 2017 1:28 pm
by RideTheWave
Are you by chance getting the telephone number field to populate in PayPal Standard? In my case, visitors have to enter it twice, once in OC and again in PayPal Standard. Do you have a similar fix for that?