Post by nick5000 » Sat Jul 21, 2012 1:37 pm

So what is the fix to send opencart address to paypal?
We have two times send orders to the wrong shipping address now recently, because paypal and opencart address are different. And yes, we have to ship to paypal address, to not get into problems with Paypal.

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by Qphoria » Sat Jul 28, 2012 6:46 am

kgkaraoke wrote: The address entered in PayPal certainly DOES matter, because in order for PayPal Seller Protection to protect the merchant from claims of non-receipt of goods, the [package must be sent to the shipping address shown in PayPal, as evidenced by the tracking number. GEEZ! Where do you guys get your misinformation from?
The customer might want to ship an item to his mom. If you force the shipping address to be the paypal address on file, then that conflicts with the customer's expectation. Since paypal is the final step.. what do you do? overwrite his address on file?

Regardless, back when this post was made, the paypal module did pass the shipping address if supplied, otherwise it would use the payment address. You have a bad habit of reviving old threads and running your mouth on them without even being on current topic. Still the store owner would more than likely ship the item to his opencart shipping address entered, not to his paypal address.

In the rare case where you require the shipping address to be the paypal verified address, that would need special coding to alert the customer of that.

Now it does appear the paypal code was changed to only pass the billing address, which is incorrect and should be addressed.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat Jul 28, 2012 6:52 am

nick5000 wrote:So what is the fix to send opencart address to paypal?
We have two times send orders to the wrong shipping address now recently, because paypal and opencart address are different. And yes, we have to ship to paypal address, to not get into problems with Paypal.
First start saying it correctly.
"How do we send the opencart SHIPPING address to paypal".. as the billing address IS already being sent.

The answer for 151+ is
1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:

Code: Select all

$order_info['payment_
3. REPLACE WITH:

Code: Select all

$order_info['shipping_
That will pass the opencart shipping address. But keep in mind this quick fix only works if shipping is always required. A more robust fix is needed for both ways.

Still you may run into issues.
Paypal offers an "address_override" flag that lets you prevent the customer from changing their address. But paypal's handling of address errors is shit and they throw a cryptic message that makes it sound like opencart sent bad parameters and offers no option of address correction. So that setting cannot be used reliably. That means the customer can still change his address when he gets to paypal if he wants.

So issues with addresses can still arise, and there is nothing we can do about it until paypal improves their standard system... and that hasn't changed in almost 10years

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by nick5000 » Wed Aug 01, 2012 7:21 pm

Thanks for the info.
Would it be possible to disable opencart shipping address, and let customer enter or chose shipping address at the Paypal site?
That will pass the opencart shipping address. But keep in mind this quick fix only works if shipping is always required. A more robust fix is needed for both ways.
What happens if there is not is not shipping required, will checkout not work?

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by kbheng » Wed Sep 18, 2013 11:35 pm

Qphoria wrote:
nick5000 wrote:So what is the fix to send opencart address to paypal?
We have two times send orders to the wrong shipping address now recently, because paypal and opencart address are different. And yes, we have to ship to paypal address, to not get into problems with Paypal.
First start saying it correctly.
"How do we send the opencart SHIPPING address to paypal".. as the billing address IS already being sent.

The answer for 151+ is
1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:

Code: Select all

$order_info['payment_
3. REPLACE WITH:

Code: Select all

$order_info['shipping_
That will pass the opencart shipping address. But keep in mind this quick fix only works if shipping is always required. A more robust fix is needed for both ways.

Still you may run into issues.
Paypal offers an "address_override" flag that lets you prevent the customer from changing their address. But paypal's handling of address errors is shit and they throw a cryptic message that makes it sound like opencart sent bad parameters and offers no option of address correction. So that setting cannot be used reliably. That means the customer can still change his address when he gets to paypal if he wants.

So issues with addresses can still arise, and there is nothing we can do about it until paypal improves their standard system... and that hasn't changed in almost 10years
Hello,

I'm using the Paypal Express, Can you share how to edit code for the same by passing shipping address to Paypal? I assume the file is pp_express.tpl, right?
Thanks.

Newbie

Posts

Joined
Wed Sep 18, 2013 11:17 pm

Post by Cue4cheap » Thu Oct 31, 2013 10:58 am

Qphoria wrote:
nick5000 wrote:So what is the fix to send opencart address to paypal?
We have two times send orders to the wrong shipping address now recently, because paypal and opencart address are different. And yes, we have to ship to paypal address, to not get into problems with Paypal.
First start saying it correctly.
"How do we send the opencart SHIPPING address to paypal".. as the billing address IS already being sent.

The answer for 151+ is
1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:

Code: Select all

$order_info['payment_
3. REPLACE WITH:

Code: Select all

$order_info['shipping_
That will pass the opencart shipping address. But keep in mind this quick fix only works if shipping is always required. A more robust fix is needed for both ways.

Still you may run into issues.
Paypal offers an "address_override" flag that lets you prevent the customer from changing their address. But paypal's handling of address errors is shit and they throw a cryptic message that makes it sound like opencart sent bad parameters and offers no option of address correction. So that setting cannot be used reliably. That means the customer can still change his address when he gets to paypal if he wants.

So issues with addresses can still arise, and there is nothing we can do about it until paypal improves their standard system... and that hasn't changed in almost 10years
I know it is a bit old but this doesn't seem to work with 1.5.6. I tried the change and it doesn't pass the shipping address. Then when I tried for force paypal standard to not allow the address to be overridden it game me the paypal error of that the merchant has required the address to be sent and it was sent in a wrong format.

I would like to do this so the shipping address put into the cart is the same on they get shipped to since I only ship to validated addresses and don't want to have the possibility of two different addresses.

EDIT: Also if I click the "I don't have a paypal account" it then shows me the page to use a credit/debit card and there it only shows the first and last name - no address info so that is why the paypal error of not being in the right format.

Thank you,
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Thu Oct 31, 2013 11:15 am

As a quick check in pp_standard.tpl I replaced the php echo stuff and populated the following lines with an address.
<input type="hidden" name="address1" value="<?php echo $address1; ?>" />
<input type="hidden" name="address2" value="<?php echo $address2; ?>" />
<input type="hidden" name="city" value="<?php echo $city; ?>" />
<input type="hidden" name="zip" value="<?php echo $zip; ?>" />
<input type="hidden" name="country" value="<?php echo $country; ?>" />
The address I put in there shows up in paypal. SO this means to me that for some reason the $address1, 2, city, etc. are not be populated and blanks are being sent to paypal hence the reason for the paypal error.

Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by art123 » Fri Mar 20, 2015 5:34 am

How do I fix this in Opencart 2.0.1.1, so their Paypal address is displayed in Paypal when they pay with Paypal.

Thanks

New member

Posts

Joined
Thu Jul 31, 2014 8:28 pm

Post by Qphoria » Thu Mar 26, 2015 10:01 pm

Cue4cheap wrote: I know it is a bit old but this doesn't seem to work with 1.5.6. I tried the change and it doesn't pass the shipping address.
This absolutely works with 1.5.6. The code doesn't lie. when you change the word "payment_" to "shipping_" then it will use those values. But again you'd need the address override flag added, but be wary of paypal's handling of odd addresses. I think they may have improved their error message now but YMMV.
I would like to do this so the shipping address put into the cart is the same on they get shipped to since I only ship to validated addresses and don't want to have the possibility of two different addresses.

EDIT: Also if I click the "I don't have a paypal account" it then shows me the page to use a credit/debit card and there it only shows the first and last name - no address info so that is why the paypal error of not being in the right format.
This may also be due to the address override. I mean the code shows that the values are being sent so if they aren't showing on the paypal side it is either due to some settings within your paypal account or some bug or intentional methods on their end.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by kalessaradan » Sat May 02, 2015 1:05 am

I have noticed this as well with 2.0.1.1. We always ship to the shipping address provided in Opencart (since many people don't bother updating their Paypal address), but having the addresses visible in Paypal meant that we could double check on expensive orders that the customer was shipping it to a confirmed address. Paypal won't side with you on a chargeback unless you shipped to a confirmed address, so when an order comes in for more than $100, we usually like to verify it is a confirmed address. And if the order is for significantly more than that, we have other steps to follow.

But for some reason, after the upgrade to 2.0, Paypal now always says the same thing for all orders.
after_upgrade.jpg

Screenshot of Paypal transaction after upgrade - after_upgrade.jpg (147.44 KiB) Viewed 7961 times


New member

Posts

Joined
Tue Aug 17, 2010 12:12 pm

Post by kalessaradan » Sat May 09, 2015 1:01 am

Is anyone else experiencing this issue with the 2.0.x.x version of OpenCart?

New member

Posts

Joined
Tue Aug 17, 2010 12:12 pm

Post by chase1987 » Mon May 11, 2015 6:59 am

Yes I am and a few others on this thread

http://forum.opencart.com/viewtopic.php?f=190&t=138451

still no fix

Newbie

Posts

Joined
Sat Feb 07, 2015 4:19 am

Post by kalessaradan » Tue May 12, 2015 1:28 am

Chase,
Did the post at the bottom of the provided post not solve the problem?

New member

Posts

Joined
Tue Aug 17, 2010 12:12 pm

Post by chase1987 » Tue May 12, 2015 12:29 pm

Yes! The fix listed on this thread did the trick.

http://forum.opencart.com/viewtopic.php?f=190&t=138451

This worked for version 2.0.1.1

Thanks to all who replied.

Newbie

Posts

Joined
Sat Feb 07, 2015 4:19 am

Post by kalessaradan » Fri May 22, 2015 4:55 am

It fixed it for me as well! Thanks for pointing that out to me.

New member

Posts

Joined
Tue Aug 17, 2010 12:12 pm

Post by BOBKIM7080 » Fri Sep 04, 2015 1:10 am

Cue4cheap wrote: The address I put in there shows up in paypal. SO this means to me that for some reason the $address1, 2, city, etc. are not be populated and blanks are being sent to paypal hence the reason for the paypal error.
I agreed,
Can you tell me how to changed your pp_standard.tpl ?

User avatar
New member

Posts

Joined
Fri Aug 26, 2011 12:53 am


Post by belowcost » Tue Sep 08, 2015 8:50 am

I am using 2.0.3.1 now, and in the last 6 months, I haven't been receiving shipping info on the paypal payments

I just updated the page as per the below, and just placed a test order, and logged into paypal standard and looked at the payment, and still no address.

Is this an OpenCart issue or PayPal?????

I used to have no problems with any of this using OpenCart, and this started 6 months ago while using 1.5.6


1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:
CODE: SELECT ALL
$order_info['payment_

3. REPLACE WITH:
CODE: SELECT ALL
$order_info['shipping_

New member

Posts

Joined
Mon Sep 26, 2011 1:54 am

Post by RideTheWave » Thu Jul 06, 2017 9:12 am

mytaste wrote:
Wed Oct 19, 2011 9:11 am
My code:

<input type="hidden" name="currency_code" value="<?php echo $currency_code; ?>" />
<input type="hidden" name="first_name" value="<?php echo $first_name; ?>" />
<input type="hidden" name="last_name" value="<?php echo $last_name; ?>" />
<input type="hidden" name="address1" value="<?php echo $address1; ?>" />
<input type="hidden" name="address2" value="<?php echo $address2; ?>" />
<input type="hidden" name="city" value="<?php echo $city; ?>" />
<input type="hidden" name="zip" value="<?php echo $zip; ?>" />
<input type="hidden" name="state" [[[[[What shall I write here??Thank you for your help!!]]]]
<input type="hidden" name="country" value="<?php echo $country; ?>" />
How about telephone numbers? There doesn't seem to be a line to pass phone number info to PayPal in the pp_standard.tpl file as well as catalog/controller/extension/payment/pp_standard.php As a result the phone number field is not populated either. Is there a fix to this?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by ADD Creative » Thu Jul 06, 2017 8:25 pm

Add to pp_standard.php:

Code: Select all

			if ($order_info['payment_iso_code_2'] == 'US') {
				$this->data['state'] = $order_info['payment_zone_code'];
			} else {
				$this->data['state'] = $order_info['payment_zone'];
			}
Change payment_ to shipping_ if needed.
Add to pp_standard.tpl:

Code: Select all

  <input type="hidden" name="state" value="<?php echo $state; ?>" />
Note: There are more countries, other than US, that require the shipping_zone_code. Look at the PayPal documentation to see which ones and add the tests for these.

For phone try adding to pp_standard.php:

Code: Select all

				$phone = preg_replace("/[^0-9.]/", "", html_entity_decode($order_info['telephone'], ENT_QUOTES, 'UTF-8'));
				$data['night_phone_a'] = substr($phone, 0, 3);
				$data['night_phone_b'] = substr($phone, 3, 3);
				$data['night_phone_c'] = substr($phone, 6);
And to pp_standard.tpl:

Code: Select all

  <input type="hidden" name="night_phone_a" value="<?php echo $night_phone_a; ?>" />
  <input type="hidden" name="night_phone_b" value="<?php echo $night_phone_b; ?>" />
  <input type="hidden" name="night_phone_c" value="<?php echo $night_phone_c; ?>" />
Note edited to correct errors.
Last edited by ADD Creative on Sun Jul 09, 2017 12:40 am, edited 2 times in total.

www.add-creative.co.uk


Active Member

Posts

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

Post by RideTheWave » Fri Jul 07, 2017 10:21 am

ADD Creative wrote:
Thu Jul 06, 2017 8:25 pm
For phone try adding to pp_standard.php:

Code: Select all

				$phone = preg_replace("/[^0-9.]/", "", html_entity_decode($order_info['telephone'], ENT_QUOTES, 'UTF-8'));
				$this->data['night_phone_a'] = substr($phone, 0, 3));
				$this->data['night_phone_b'] = substr($phone, 3, 3);
				$this->data['night_phone_c'] = substr($phone, 6);
Where specifically should we add this code in the pp_standard.php file? I added it above the following code:

Code: Select all

	$data['currency_code'] = $order_info['currency_code'];
			$data['first_name'] = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8');
			$data['last_name'] = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8');
but I get a syntax error on the checkout page (in the confirmation step). Is there somewhere specific we should add it?

New member

Posts

Joined
Fri May 19, 2017 8:29 am
Who is online

Users browsing this forum: No registered users and 4 guests