jarrettolson Posted December 2, 2009 Share Posted December 2, 2009 I am using Express Checkout Module in my store, I wanted to first thank you for all the effort it takes to create so many lines of code. If a customer uses express checkout without logging into our site they are returned to the shipping page to an error code in UPS xml :111286 __ is not a valid state. The blank being whatever state I used in sandbox to create a fictitious customer. I looked up the code in UPSXML and it shows the following: "%state% is not a valid state abbreviation for %country%" It seems that the code with the module is returning a different or unfamiliar country code from paypal. I believe that this is also the source of the state tax not being calculated since oscommerce is not recognizing the country and therefore the state that the purchaser is from. I have hosting and SSL through GoDaddy on a shared server and contacted them to make sure that no variable were being blocked and they said nothing was being blocked that they could see. Before this module was installed I was able to receive shipping quotes. Any help you could give me would be greatly appreciated. Regards, Jarrett Quote Link to comment Share on other sites More sharing options...
jarrettolson Posted December 18, 2009 Author Share Posted December 18, 2009 I am using Express Checkout Module in my store, I wanted to first thank you for all the effort it takes to create so many lines of code. If a customer uses express checkout without logging into our site they are returned to the shipping page to an error code in UPS xml :111286 __ is not a valid state. The blank being whatever state I used in sandbox to create a fictitious customer. I looked up the code in UPSXML and it shows the following: "%state% is not a valid state abbreviation for %country%" It seems that the code with the module is returning a different or unfamiliar country code from paypal. I believe that this is also the source of the state tax not being calculated since oscommerce is not recognizing the country and therefore the state that the purchaser is from. I have hosting and SSL through GoDaddy on a shared server and contacted them to make sure that no variable were being blocked and they said nothing was being blocked that they could see. Before this module was installed I was able to receive shipping quotes. Any help you could give me would be greatly appreciated. Regards, Jarrett So I have been in talks with Aziz, who has been so nice to be talking back and forth with me. We figured out the shipping problem for UPSXML was that PayPal was returning a value of Ca and UPSXML only recognizes CA, so he changed a the return state to capitalize the returned value and now the shipping modules are calculating the correct value. Now on to the tax; it is still not being calculated. I believe that the shipping modules are correctly identifying the value that PayPal is sending but now OsCommerce database is not. Is it possible to have the database setup to recognize multiple spellings of the same state or am I just way off? Regards, Jarrett Quote Link to comment Share on other sites More sharing options...
jarrettolson Posted December 18, 2009 Author Share Posted December 18, 2009 (edited) opps Edited December 18, 2009 by jarrettolson Quote Link to comment Share on other sites More sharing options...
knutt Posted January 14, 2010 Share Posted January 14, 2010 Have you or anyone found a solution to this issue? OSC calculates taxes correctly for Check/Money Order and Paypal Direct Payment modules but as soon as I select Paypal Express Checkout it drops the taxes and it will not calculate it anymore even if I switch back to Check/Money Order payment option. I have looked everywhere on the internet for a solution but without success. This is the only thing holding me back from going live with my shop. Thanks in advance for any help. Jeremey Quote Link to comment Share on other sites More sharing options...
knutt Posted January 19, 2010 Share Posted January 19, 2010 Have you or anyone found a solution to this issue? OSC calculates taxes correctly for Check/Money Order and Paypal Direct Payment modules but as soon as I select Paypal Express Checkout it drops the taxes and it will not calculate it anymore even if I switch back to Check/Money Order payment option. I have looked everywhere on the internet for a solution but without success. This is the only thing holding me back from going live with my shop. Thanks in advance for any help. Jeremey I still do not have a solution but I have figured out it has something to do with the variable Paypal passes back to OSCommerce for the Province/State. Once I return from Paypal to confirm my order in OSCommerce the taxes are not calculated. BUT...if I change the shipping address to one stored in the OSCommerce Users account, the taxes are then calculated. So something Paypal is sending back is not being correctly understood by OSCommerce. That being said, I still would love a little insight to a solution. Thanks Quote Link to comment Share on other sites More sharing options...
knutt Posted January 19, 2010 Share Posted January 19, 2010 I still do not have a solution but I have figured out it has something to do with the variable Paypal passes back to OSCommerce for the Province/State. Once I return from Paypal to confirm my order in OSCommerce the taxes are not calculated. BUT...if I change the shipping address to one stored in the OSCommerce Users account, the taxes are then calculated. So something Paypal is sending back is not being correctly understood by OSCommerce. That being said, I still would love a little insight to a solution. Thanks Here is a screen shot of what is going on. In the Delivery Address is the format returned by Paypal and in the Billing Address is the format created by OSCommerce. Notice the "Ontario" in Delivery and the "ON" in Billing. How do I get the returned Paypal address to format like the Billing address is? Quote Link to comment Share on other sites More sharing options...
romal Posted December 7, 2010 Share Posted December 7, 2010 Solution: Modify next query in ext/modules/payment/paypal/express.php Query was (for about line 100): $zone_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country['countries_id'] . "' and zone_code = '" . tep_db_input($zone_code) . "'"); Replace it with: $zone_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country['countries_id'] . "' and (upper(zone_code) = '" . strtoupper(tep_db_input($zone_code)) . "' or upper(zone_name) = '" . strtoupper(tep_db_input($zone_code)) . "' )"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.