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.
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.
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?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?
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.
First start saying it correctly.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.
"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_
Code: Select all
$order_info['shipping_
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
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?
Would it be possible to disable opencart shipping address, and let customer enter or chose shipping address at the Paypal site?
What happens if there is not is not shipping required, will checkout not work?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.
Hello,Qphoria wrote:First start saying it correctly.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.
"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:3. REPLACE WITH:Code: Select all
$order_info['payment_
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.Code: Select all
$order_info['shipping_
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'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.
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.Qphoria wrote:First start saying it correctly.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.
"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:3. REPLACE WITH:Code: Select all
$order_info['payment_
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.Code: Select all
$order_info['shipping_
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 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
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
<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
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.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 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.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.
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.
But for some reason, after the upgrade to 2.0, Paypal now always says the same thing for all orders.
Yes I am and a few others on this thread
http://forum.opencart.com/viewtopic.php?f=190&t=138451
still no fix
http://forum.opencart.com/viewtopic.php?f=190&t=138451
still no fix
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.
http://forum.opencart.com/viewtopic.php?f=190&t=138451
This worked for version 2.0.1.1
Thanks to all who replied.
I agreed,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.
Can you tell me how to changed your pp_standard.tpl ?
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_
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_
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?mytaste wrote: ↑Wed Oct 19, 2011 9:11 amMy 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; ?>" />
Add to pp_standard.php:
Change payment_ to shipping_ if needed.
Add to pp_standard.tpl:
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:
And to pp_standard.tpl:
Note edited to correct errors.
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'];
}
Add to pp_standard.tpl:
Code: Select all
<input type="hidden" name="state" value="<?php echo $state; ?>" />
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);
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; ?>" />
Last edited by ADD Creative on Sun Jul 09, 2017 12:40 am, edited 2 times in total.
Where specifically should we add this code in the pp_standard.php file? I added it above the following code:ADD Creative wrote: ↑Thu Jul 06, 2017 8:25 pmFor 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);
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');
Who is online
Users browsing this forum: No registered users and 26 guests