FOUND IT!!!! Fixed it (maybe).
but first, the requested data:
1 Who do you host with? goDaddy
2 unix or windows? Linux
3 what version of php? 5.0.4
4 clean install or upgrade? Clean install + latest patch.
5 are you using IPN or PayPal Express? when receiving this error? Paypal Express
6 Do you have 1 or both installed? Meaning, if not using one or the other do you have the other one installed? - only Paypal Express
7 is there a pattern or specific country that this happens with? Definitely US, not certain of others.
8 Live or Sandbox? Live
Being impatient i started looking at the code. In paypalwpp.php in function ec_step2_finish around line 1770 there is a nice check
if (!isset($paypal_ec_payer_info['ship_country_code']))
Well, it just happens that it IS set to '' (nothing).
Changing that line to:
if ((!isset($paypal_ec_payer_info['ship_country_code'])) OR ($paypal_ec_payer_info['ship_country_code']=='')) {$paypal_ec_payer_info['ship_country_code'] = $country1->fields['countries_iso_code_2']; $_SESSION['paypal_ec_payer_info']['ship_country_code']= $country1->fields['countries_iso_code_2'];}
allowed me to successfully complete a transaction.
Now, I do NOT know PHP, and I do NOT understand Zen Cart guts well enough to say that this is IT. The problem is probably somewhere upstream and the fix is more elegant.
I can easily imagine though that PAyPal changed their protocol to return an empty but defined value instead of returning none, thus quietly throwing a wrench into Zen Cart machinery.
I can't wait what the PROs think!
~Andrey
Bookmarks