Jump to content

PAYPAL_ADDRESS overrides MY ADDRESS


Slava

Recommended Posts

HI, I'm using:

PrestaShop 1.5.6.2

Paypal 3.6.5 (Sandbox mode)

 

I created an account with the following:

MY ADDRESS

Test Customer

Main Street

Sallins Kildare

Ireland

12345678

post-158271-0-61028600-1392662318_thumb.png

 

Then I made order choosing above address.

 

After order I noticed that the address is changed in:
My Account -> Order history
My Account -> My Addresses

Before I made order the title of the address was MY ADDRESS after ordering PAYPAL_ADDRESS
Also client's name and the name of the country was changed.

post-158271-0-05226100-1392662398_thumb.png post-158271-0-57330800-1392662427_thumb.png

also in BO -> Orders -> order which I made
-> Delivery address I can see not correct address

post-158271-0-82900000-1392662449_thumb.png

It seems that Paypal returns and overrides the data.

Could someone explain what is going on please.

Link to comment
Share on other sites

  • 3 weeks later...

There are a lot of people with this problem. After version 3.6.2 the module paypal can overrride the customer address with the address in Paypal customer account.

 

Its a very big problem!

 

in my case, I estimate shipping charges. But Paypal changes the shipping address and generates different shipping costs.

Link to comment
Share on other sites

I am currently having this problem as well, prestashop 1.5.6.2 and paypal module 3.6.5

I get customers complaining daily, this needs to be addressed.

 

The functionality expected is that the ship-to address used should be what is entered on the prestashop store site.

Link to comment
Share on other sites

  • 2 weeks later...

I have same problem you describe here, but now i think it works, well i've tested a couple of times and now after paying with paypal module, prestashop maintain address of system, and it's not overridden with paypal address.

 

what i did is change from true to false: /modules/paypal/views/templates/hook/integral_evolution_payment.tpl: <input type="hidden" name="address_override" value="false" /><!-- true -->  

 

i only tested with spanish address, but i suppose that should be work with all. prestashop 1.5.6.0 and paypal 3.6.5

 

Bye!

Link to comment
Share on other sites

Thanks for your solution Visible!

Looks like you are using "Website Payments Pro Hosted" option.
I use "Website Payments Standard" option so this part of the form:

<input type="hidden" name="address_override" value="false" />

is not send to my Paypal option.

I think that if your solution is working for you it should work for anyone with "Website Payments Pro Hosted" option.

Solution for "Website Payments Standard"
Comment out:

line 194 -- $address->add();

line 199 -- $address->save();

 

in: modules/paypal/express_checkout/payment.php

        /* Create address */
        if (is_array($address) && isset($address['id_address']))
            $address = new Address($address['id_address']);

        if ((!$address || !$address->id) && $customer->id)
        {//If address does not exists, we create it
            $address = setCustomerAddress($ppec, $customer);
            //$address->add(); // LINE 194 Comment out HERE
        }
        else if($customer->id)
        {//If address exists, we update it with new informations
            $address = setCustomerAddress($ppec, $customer, $address->id);
            //$address->save(); // LINE 199 Comment out HERE
        }

I created 4 addresses:
one German, one Irish, one Polish and one French.
Then I made several orders assigning above addresses and seems to be good. I don't see PAYPAL_ADDRESS in any part of back or front office.

Please note it's not fully tested and I'm not sure that this don't brake any other functionality.

Edited by Slava (see edit history)
  • Like 2
Link to comment
Share on other sites

Thanks for your solution Visible!

Looks like you are using "Website Payments Pro Hosted" option.

I use "Website Payments Standard" option so this part of the form:

<input type="hidden" name="address_override" value="false" />

is not send to my Paypal option.

 

I think that if your solution is working for you it should work for anyone with "Website Payments Pro Hosted" option.

 

Solution for "Website Payments Standard"

Comment out:

line 194 -- $address->add();

line 199 -- $address->save();

 

in: modules/paypal/express_checkout/payment.php

        /* Create address */
        if (is_array($address) && isset($address['id_address']))
            $address = new Address($address['id_address']);

        if ((!$address || !$address->id) && $customer->id)
        {//If address does not exists, we create it
            $address = setCustomerAddress($ppec, $customer);
            //$address->add(); // LINE 194 Comment out HERE
        }
        else if($customer->id)
        {//If address exists, we update it with new informations
            $address = setCustomerAddress($ppec, $customer, $address->id);
            //$address->save(); // LINE 199 Comment out HERE
        }

I created 4 addresses:

one German, one Irish, one Polish and one French.

Then I made several orders assigning above addresses and seems to be good. I don't see PAYPAL_ADDRESS in any part of back or front office.

 

Please note it's not fully tested and I'm not sure that this don't brake any other functionality.

 

Hi Slava, we are using Standard Payment as well, so it means that in some moment of transaction, the form inside file /modules/paypal/views/templates/hook/integral_evolution_payment.tpl is sent to paypal.

 

I think your purpose is another way to solve this question.

 

Bye!

Link to comment
Share on other sites

  • 5 months later...

Hi Slava. Thanks very much for this solution. This was causing an issue for me where the state would be updated and the customer would be charged the wrong amount for shipping. 

 

I am using Prestashop 1.6.0.8 and Paypal Europe version 3.7.2. The line numbers a slightly different but it was easy to find the code blocks in question.

 

Thanks again,

Rhys

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...

This is a very serious bug:

 

We have just shipped a large furniture item to the wrong state (at a cost of $160) because PayPal overwrote the customers new address in prestashop. Now I'm out of pocket for that. The customer had their old address in PayPal and new address in Prestashop. They did not see any option in PayPal to change the address.

 

Who supplied the PayPal module - Prestashop or PayPal ?

 

Peter

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...