Jump to content

[Fixed] Duplicate paypal address with express checkout at PS 1.7.2.4


guuds

Recommended Posts

There is a problem with the offical paypal modules(V4.2.1) in Prestashop 1.7.2.4

When use the paypal checkout shortcut at the product page, after return from the paypal website, a new same address(address with a state) created every time, after check the code, the problem is in the file /modules/paypal/controllers/front/ecScOrder.php

at line 77:

                && (isset($info['PAYMENTREQUEST_0_SHIPTOSTATE'])?$address['id_state'] == $info['PAYMENTREQUEST_0_SHIPTOSTATE']:true)

change it to 

                && (isset($info['PAYMENTREQUEST_0_SHIPTOSTATE'])?$address['id_state'] == State::getIdByIso($info['PAYMENTREQUEST_0_SHIPTOSTATE'], Country::getByIso($info['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'])):true)

then it's work now

If you face this problem, you can try this

Edited by guuds (see edit history)
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...