Jump to content

PayPal is changing cart addresses


bacuri

Recommended Posts

Hello,

 

I'm using paypal module (for 1.6 version). I've notice some strange behavior. Some orders payed by paypal have same same delivery and invoice address. But in cart originally where two different addresses. Why is that?

I found in express_checkout\payment.php code:

First module gets last address (randomly, becouse getAddresses gets address without order by)

$addresses = $customer->getAddresses($ppec->context->language->id);
        foreach ($addresses as $address) {
            if ($address['alias'] == 'Paypal_Address') {
                //If address has already been created
                $address = new Address($address['id_address']);
                break;
            }
        }

And then updates cart addresses to same address:

        if ($customer->id && $address->id) {
            $ppec->context->cart->id_customer = $customer->id;
            $ppec->context->cart->id_address_delivery = $address->id;
            $ppec->context->cart->id_address_invoice = $address->id;
            $ppec->context->cart->id_guest = $ppec->context->cookie->id_guest;

Why is that? Addresses shouldn't be touched. Can I comment addresses update?

 

Edited by bacuri (see edit history)
Link to comment
Share on other sites

Hello,
I am Daria, technical support manager for PrestaShop module Custom Fields and I'm glad to help you.

I invite you to create a support ticket for us via this link, indicating all the details (full PS and module versions, steps to reproduce the behavior, if you use any customized theme or one-page checkout module et.):

https://addons.prestashop.com/en/contact-us?id_product=1748

Kindly note, that we provide support for versions of PS starting from 1.6.1.24 and superior.

 

Regards,

Daria - support 202 e-commerce

Link to comment
Share on other sites

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...