Post by tora0515 » Wed Jun 26, 2013 9:32 am

Hey all,

I just started accepting orders from other countries and am running into a problem with pre populating paypal fields. I am using payment standard.

Anyway, It is populating the name, number and email, but not the address, state, or zip code. Any idea why this would happen? Then only thing I changed was before I was accepting only Australian orders, but now I accept orders from US, Canada, Japan and New Zealand. All the input fields have been left untouched, just added the countries in admin.

Thanks

So if I select Australia as the country, everything is passing over just fine. But When I choose any of the other countries I am not seeing address, state, or zip.

Maybe there is a setting in paypal's back end somewhere that I am missing?
Last edited by tora0515 on Wed Jun 26, 2013 1:35 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Jun 15, 2012 3:05 pm

Post by tora0515 » Wed Jun 26, 2013 3:28 pm

For some stupid reason, "STATE" is not included in the paypal module...come on guys.

/catalog/controller/payment/pp_standard.php

you need to put in

Code: Select all

$this->data['state'] = html_entity_decode($order_info['payment_zone_code'], ENT_QUOTES, 'UTF-8');	
after:

Code: Select all

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

Then

/catalog/view/theme/default/template/payment/pp_standard

and put in:

Code: Select all

 <input type="hidden" name="state" value="<?php echo $state; ?>" />
after

Code: Select all

<input type="hidden" name="city" value="<?php echo $city; ?>" />
This should make your customers nice and happy because now just about every country is taken care of. Still won't populate the Australian and Japaense states, and the Japanese post code will need to be re entered if the screen is refreshed with errors from other fields. But oh well, will work on that later.

Active Member

Posts

Joined
Fri Jun 15, 2012 3:05 pm

Post by leandromello » Wed Jul 08, 2015 8:31 pm

I'm having this problem, but i checked somes difference in the fields.
For example: in Opencart we have POSTCODE and in PAYPAL have field ZIP.

This could be a problem?
My OC is not sending de address to Paypal.

New member

Posts

Joined
Fri Oct 28, 2011 3:29 am

Post by Qphoria » Wed Jul 08, 2015 9:53 pm

leandromello wrote:I'm having this problem, but i checked somes difference in the fields.
For example: in Opencart we have POSTCODE and in PAYPAL have field ZIP.

This could be a problem?
My OC is not sending de address to Paypal.
no.. that is just a label.. OC is passing the correct parameter name for that field.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Jul 08, 2015 9:54 pm

leandromello wrote:I'm having this problem, but i checked somes difference in the fields.
For example: in Opencart we have POSTCODE and in PAYPAL have field ZIP.

This could be a problem?
My OC is not sending de address to Paypal.
no.. that is just a label.. OC is passing the correct parameter name for that field.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by leandromello » Thu Jul 09, 2015 3:47 am

@Qphoria
Thanks for the answer.

I OC 2.0.3.1 i create a NEW field...
How can i add this field in Paypal mod, to populate the form?

The new field:
name=custom_field[account][1]

New member

Posts

Joined
Fri Oct 28, 2011 3:29 am

Post by Qphoria » Sat Jul 11, 2015 9:52 pm

leandromello wrote:@Qphoria
Thanks for the answer.

I OC 2.0.3.1 i create a NEW field...
How can i add this field in Paypal mod, to populate the form?

The new field:
name=custom_field[account][1]
You can only pass fields that paypal has an equivalent allowed parameter for.
So depending on the field, you may be able to repurpose another field like "company" for "favorite color" but you can't just pass arbitrary fields over with a custom label.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by leandromello » Mon Jul 13, 2015 7:06 pm

thanks... i'll try.
I discovered that for now it is not supported on Paypal Brazil.

New member

Posts

Joined
Fri Oct 28, 2011 3:29 am
Who is online

Users browsing this forum: No registered users and 87 guests