I noticed that when the user goes through Paypal EC, and I have the setting:

Update billing customer profiles with address information the customer enters at PayPal.

Paypal EC doesn't update the country of the billing information.

So if my addressfield has a default country, it will always save the billing address with the default country even if the Paypal User perhaps was from another country.

Patch is attached. I'm not sure though if my assumption was correct. If it's not, we can just make the country an empty string to make sure no default value is saved.

Actually, now that I think about it... I'm not even sure why we are assuming the default values are safe to load. I use my default values because I assume that most orders in the store would be in a certain country. That way it's easier/faster for most of my users to fill up the form. But it's not an assumption that all of my orders are in that certain country.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dxx’s picture

dxx’s picture

FileSize
18.78 KB

Sorry it's another issue!

dxx’s picture

akosipax’s picture

This is a different issue. It is official that Paypal does not pass on the billing information as mentioned in https://www.drupal.org/node/2036929#comment-7755279

This is simply talking about default values being saved to the billing information (in this case, my site has a default value for 'Country')

dxx’s picture

Yes I confirm that the patch fixes this bug. I was wrong issue sorry, I edited my answer ;)

akosipax’s picture

Made paths of the patch relative and also used a more proper naming convention for patches.

mglaman’s picture

Title: Billing Info's country not being updated / overwritten » Set the billing information country from Express Checkout
FileSize
965 bytes

COUNTRYCODE is the payment information's country code, via https://developer.paypal.com/docs/classic/api/merchant/DoExpressCheckout...

  • mglaman committed 1ec4818 on 7.x-2.x authored by akosipax
    Issue #2365797 by akosipax, mglaman, dxx: Set the billing information...
mglaman’s picture

Status: Needs review » Fixed

Thanks! Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.