lvemy3100 Posted May 24, 2013 Share Posted May 24, 2013 First off I would like to thank everyone that helps here as I have been able to fix many issues with my store over the years just by visiting this forum. That being said once I upgraded to 5.2.2 from 5.2.1 I thought I would be fine since many others had done so with minimal to no issues. Unfortunately for me this wasnt the case. So here is the issue... I have a PayPal Pro Payments account and had paypal checkout working fine in version 5.2.1 and was told there were no changes to PayPal checkout code in the upgrade but I now have 2 issues with paypal checkout that I will try to explain the best that I can and perhaps someone can help or at least give me a clue as me knowledge and exp in this field is extremely limited. Error 1. When using the orange "PayPal Express Payment" button located under the standard store checkout button you are brought to a blank page and given no error message nor any other indicator that anything is working as it should or shouldnt. Doing so creates a pending order in the store. Error 2. When using the main checkout button and then selecting PayPal as the checkout option you are given an error showing "the address match of the Shipping Address City, State and Postal Code failed" After which you are brought to a PayPal page telling you that there was something wrong with the order and that you should go back to the store and try checking out again. I have created a support ticket (started May1st) but have had no luck getting this fixed as I am now waiting on yet another reply from whoever decides to help. Not that I dont appreciate the help they are trying to provide but without going into much detail this issue was once thought to be resolved via code tweaks made by support but after changing from "express only" to "pro and express payments" in the plugin the issue came back only now I am being told by support that I need to change settings in PayPal itself to fix it but that obviously makes no sense to me as how would it have been fixed before and then not working again yet during this entire time I have not made any changes to PayPal itself only the plugin on the store. the store address is www.mpracing.org/store I appreciate any help anyone may be able to provide in this matter as I would like to get my store function properly and stop losing business. Thanks in advance for any help anyone may be able to provide. Also in order to keep the store working properly for the time being I have turned the paypal plugin off and turned regular card capture on but I will attach screenshots to show the errors. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Would you please examine the CubeCart admin Request Log (the link is at the bottom of the admin navigation). There should be an entry when the PayPal orange button blank screen happened. It will read something like:25 May 2013, 09:38 Request Sent - https://api-3t.sandbox.paypal.com/nvp ITEMAMT=10.00&AMT=10.00 ... Response received TIMESTAMP=2013%2d05%2d25T15%3a39%3a02Z ... For my experiment, I got a Error: Security header is not valid As well as a blank page. And I see that CubeCart is wanting to go to /index.php?_a=gateway&module=PayPal_Pro But PayPal_Pro isn't a gateway, it's a plugin. I will see if that makes a difference. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 I found something that does not look right, but I haven't yet verified that this is the problem. In the file /modules/plugins/PayPal_Pro/website_payments_pro.class.php, near line 496, find a statement that begins with:$this->update('CubeCart_order_summary', ...So far, I cannot agree that the Website_Payments_Pro class has incorporated the Database class so that $this->update() works. As an experiment, change:$this->updateto$GLOBALS['db']->update I will try it, but I ask that lvemy3100 verify any change in results. (It's odd that PHP did not report the problem "Method does not exist.") Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Although the edit above is valid, it is not the fix. Moving past this point... A PayPal_Pro hook, class.cubecart.construct.gateway.php, calls SetExpressCheckout() in the Website_Payments_Pro class. SetExpressCheckout() sends the order data and receives the response from PayPal. (Since I don't have a PayPal account, I expect an error. See above.) So, when PayPal responds with 'Failure', CubeCart creates an error message and returns script execution back to the hook with a false result. (If PayPal returned success, CubeCart would send the customer to PayPal.) Back at the hook, nothing is done about the false return value. In fact, CubeCart just exits. Quits. So, on the one hand, PayPal must be reporting an error. Look in the Request Log for PayPal activity. On the other hand, abruptly exiting is not nice. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 Thank you for your response. I just went ahead and gave this a try. Unfortunately I did not have any luck in fixing the errors this way and the errors stayed the same. as for the request logs.. When using the paypal option found after using the normal checkout button Request Sent - https://api-3t.paypal.com/nvp ITEMAMT=81.55&AMT=81.55&SHIPTONAME=Mark+Pettersen&SHIPTOSTREET=127+Bellevue+Dr.&SHIPTOSTREET2=&SHIPTOCITY=Round+Lake&SHIPTOSTATE=Illinois&SHIPTOZIP=60073&SHIPTOCOUNTRY=US&SHIPTOPHONENUM=2247155229&ADDROVERRIDE=1&SALUTATION=&FIRSTNAME=Mark&LASTNAME=Pettersen&STREET=127+Bellevue+Dr.&STREET2=&CITY=Round+Lake&STATE=Illinois&ZIP=60073&PHONENUM=2247155229&COUNTRYCODE=US&CURRENCYCODE=USD&PAYMENTACTION=Sale&RETURNURL=https%3A%2F%2Fwww.mpracing.org%2Fstore%2Findex.php%3F_a%3Dconfirm&CANCELURL=https%3A%2F%2Fwww.mpracing.org%2Fstore%2Findex.php%3F_a%3Dconfirm%26PPWPP%3Dcancel&INVNUM=130525-153556-8527&METHOD=SetExpressCheckout&VERSION=65.0&PWD=HZJG2XF4NZGKSJKM&USER=goodtimes421_api1.gmail.com&SIGNATURE=A8UNp0XL0ExRwgoUf9upRLLNyrQ9A-w6DFk.E6rSQmqYMOcPuZsl3Grl Response received TIMESTAMP=2013%2d05%2d25T20%3a36%3a22Z&CORRELATIONID=cad9cb8fefc79&ACK=Failure&VERSION=65%2e0&BUILD=6020375&L_ERRORCODE0=10736&L_SHORTMESSAGE0=Shipping%20Address%20Invalid%20City%20State%20Postal%20Code&L_LONGMESSAGE0=A%20match%20of%20the%20Shipping%20Address%20City%2c%20State%2c%20and%20Postal%20Code%20failed%2e&L_SEVERITYCODE0=Error When using the orange paypal button Request Sent - https://api-3t.paypal.com/nvp ITEMAMT=81.55&AMT=81.55&SHIPTONAME=Mark+Pettersen&SHIPTOSTREET=127+Bellevue+Dr.&SHIPTOSTREET2=&SHIPTOCITY=Round+Lake&SHIPTOSTATE=Illinois&SHIPTOZIP=60073&SHIPTOCOUNTRY=US&SHIPTOPHONENUM=2247155229&ADDROVERRIDE=1&SALUTATION=&FIRSTNAME=Mark&LASTNAME=Pettersen&STREET=127+Bellevue+Dr.&STREET2=&CITY=Round+Lake&STATE=Illinois&ZIP=60073&PHONENUM=2247155229&COUNTRYCODE=US&CURRENCYCODE=USD&PAYMENTACTION=Sale&RETURNURL=https%3A%2F%2Fwww.mpracing.org%2Fstore%2Findex.php%3F_a%3Dconfirm&CANCELURL=https%3A%2F%2Fwww.mpracing.org%2Fstore%2Findex.php%3F_a%3Dconfirm%26PPWPP%3Dcancel&INVNUM=130525-153556-8527&METHOD=SetExpressCheckout&VERSION=65.0&PWD=HZJG2XF4NZGKSJKM&USER=goodtimes421_api1.gmail.com&SIGNATURE=A8UNp0XL0ExRwgoUf9upRLLNyrQ9A-w6DFk.E6rSQmqYMOcPuZsl3Grl Response received TIMESTAMP=2013%2d05%2d25T20%3a35%3a57Z&CORRELATIONID=f718d37186415&ACK=Failure&VERSION=65%2e0&BUILD=6020375&L_ERRORCODE0=10736&L_SHORTMESSAGE0=Shipping%20Address%20Invalid%20City%20State%20Postal%20Code&L_LONGMESSAGE0=A%20match%20of%20the%20Shipping%20Address%20City%2c%20State%2c%20and%20Postal%20Code%20failed%2e&L_SEVERITYCODE0=Error Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 This is what error 10736 is referring to: SHIPTOCITY=Round Lake SHIPTOSTATE=Illinois SHIPTOZIP=60073 SHIPTOCOUNTRY=US In the SetExpressCheckout function, there is this (near line 453): 'SHIPTOSTATE' => $delivery['state_abbrev'], The shipping state value is using the customer's delivery address's state abbreviation, which should be IL. I cannot say if this is actually what PayPal is rejecting. If PayPal is accepting only the state abbreviation, we need to find out why CubeCart is putting the whole of the state's name in the state_abbrev key of the shipping address array. (The billing state value is also the state's whole name. Need to find out where Cubecart is getting this confused.) Can you verify that the database table CubeCart_geo_zone has a proper configuration: `id` int(10) unsigned NOT NULL auto_increment, `country_id` smallint(4) unsigned NOT NULL default '0', `abbrev` varbinary(4) NOT NULL default '', `name` varbinary(40) NOT NULL default '', Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 Not quite sure I understand by your statement that there is no Round Lake in Illinois. There is but upon further review I had edited this address previously to try to see if there was something I could do (not code related) to fix this. I actually live in Round Lake Park. Round Lake Round Lake Park Round Lake Heights Round Lake Beach These are all individual towns that should only be one.. lol Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Please view the table CubeCart_addressbook. In the 'state' column, there should be only numbers. (I edited my previous post, please re-read it.) Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 Can you verify that the database table CubeCart_geo_zone has a proper configuration: `id` int(10) unsigned NOT NULL auto_increment, `country_id` smallint(4) unsigned NOT NULL default '0', `abbrev` varbinary(4) NOT NULL default '', `name` varbinary(40) NOT NULL default '', This is what is had.. `id` int(10) unsigned NOT NULL auto_increment, `country_id` smallint(4) unsigned NOT NULL default '0', `abbrev` varchar(4) NOT NULL default '', `name` varchar(40) NOT NULL default '', I have gone ahead and made the change to varbinary this however has not fixed the address error. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 'address_id' int(10) UNSIGNED No auto_increment customer_id' int(10) UNSIGNED No 'billing' enum('0', '1') utf8_unicode_ci No 0 'default' enum('0', '1') utf8_unicode_ci No 0 'description' varchar(250) utf8_unicode_ci No 'addressee' varchar(100) utf8_unicode_ci No 'title' varchar(20) utf8_unicode_ci No 'first_name' varchar(250) utf8_unicode_ci No 'last_name' varchar(250) utf8_unicode_ci No 'company_name' varchar(200) utf8_unicode_ci No 'line1' varchar(200) utf8_unicode_ci No 'line2' varchar(200) utf8_unicode_ci No 'town' varchar(100) utf8_unicode_ci No 'state' varchar(100) utf8_unicode_ci No 'postcode' varchar(15) utf8_unicode_ci No 'country' smallint(3) UNSIGNED No Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Sorry, I was asking you to verify the contents, not the configuration. For the table's records, the column 'state' should have only numbers. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 Sorry, I was asking you to verify the contents, not the configuration. For the table's records, the column 'state' should have only numbers. Ok now I got ya. So upon checking this I come accross the fact that only the first 12 address in this have numbers for the state and every other address shows the actual FULL state name. So now that we know that all but 12 addresses are wrong in the database? If so I hope there is an easy fix because I would then have 2,238 addresses to fix.. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Wow! Two thousand plus! I don't think you've mentioned it, but would you recount your entire CubeCart upgrade history? I'm thinking there may have been an upgrade step that failed to update the addressbook. Did you "import" a customer list from an outside source? But just to confirm the PayPal problem, just fix Mark Pettersen's addressbook to have 23 instead of Illinois in the state column. (He may have more than one addressbook record.) Then have him start a brand new order. If that's not possible, I want you to create a fictitious customer, add an address, and make sure that this new customer has a number for the state in that addressbook record. Then have this new customer make a PayPal purchase. Send me your email address in a Private Message and I will send you a file I created that should change all the state names for numbers. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 Wow! Two thousand plus! I don't think you've mentioned it, but would you recount your entire CubeCart upgrade history? I'm thinking there may have been an upgrade step that failed to update the addressbook. Did you "import" a customer list from an outside source? I started with this store way back v3 (free). I dont remember the exact updates I have used over the years but there have been many. Never needed to import or export customer list at any point though I do see some things in my snooping just a few minutes while trying to source what the proper code was for illinois... it seems that in Cubecart_geo_country there is an error The following indexes appear to be equal and one of them should be removed: id, id_2 also while viewing the contents of the cubecart_addressbook I noticed customers who are in the US showing 2 different codes for country 840 and 226. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 25, 2013 Share Posted May 25, 2013 Ok, we definitely have a case where an upgrade script did not run properly that updated the addressbook. The proper value for CC522 is 840 for the USA. You can remove the id_2 index. Stay tuned. (In the CubeCart_history table, you will find the sequence of updates.) Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 25, 2013 Author Share Posted May 25, 2013 4.4.4 4.4.5 5.0.0b1 5.0.0b2 5.0.0b4 5.0.0b5 5.0.0b6 5.0.0b7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.2.0 Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 27, 2013 Author Share Posted May 27, 2013 Ok, we definitely have a case where an upgrade script did not run properly that updated the addressbook. The proper value for CC522 is 840 for the USA. You can remove the id_2 index. Stay tuned. (In the CubeCart_history table, you will find the sequence of updates.) Ok so upon further review I have noticed two codes being given for Canada as well. I guess my database is all sorts of messed up? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 27, 2013 Share Posted May 27, 2013 No, maybe not as bad as it seems. How many unique countries have you sold to? Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 28, 2013 Author Share Posted May 28, 2013 No, maybe not as bad as it seems. How many unique countries have you sold to? I have gone ahead and sent you an email with some info. If I had to guess I would say maybe 4. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted May 31, 2013 Author Share Posted May 31, 2013 Just a little update - It seems that the orange paypal express button DOES work when the customer is not logged in or registered. However once a customer is logged in the issue comes back. So after some changes and "fixes", thanks to Bsmither, I at least have an address book that is filled in properly lol only it seems that the address book/database was just an additional issue on top of the PayPal issue Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2013 Share Posted May 31, 2013 I know your experiments have involved attempts to use the PayPal gateway by using just one customer. According to what you have indicated about a not-logged-in customer, the data sent is taken directly from the form given to the not-logged-in customer during checkout (and the form was missing, or did not provide to PayPal, the name and shipping address, but included only the 'billing' address). Earlier, I asked you to create a fictitious customer (only because you know what the password is), add an address to the addressbook, then have this new customer log-in and make a PayPal purchase. Quote Link to comment Share on other sites More sharing options...
lvemy3100 Posted June 3, 2013 Author Share Posted June 3, 2013 Earlier, I asked you to create a fictitious customer (only because you know what the password is), add an address to the addressbook, then have this new customer log-in and make a PayPal purchase. Until now the account being used in my experiments has been a fictitious one created solely for the purpose of these tests. I have also deleted the account and made a new account for each possible fix that has been applied. Quote Link to comment Share on other sites More sharing options...
javarco Posted October 11, 2013 Share Posted October 11, 2013 Was this ever resolved? I keep searching forums and I am still not able to find a suitable resolution. Whenever I try to purchase as a new unregistered customer it goes all the way through just fine. But if a customer is a registered user or a guest who opts to create an account then it gets stuck and I get the following error msg. By the way im using version 5.2.2. and using the Paypal Gateway (not the plugin). In the meantime, is there a way to turn off the 'Create an account' feature at least till this gets resolved? This is really killing my sales. Please review your shipping address Error Message There's a problem with the shipping address you entered on the merchant site, and we've marked it in red. Please change the address, then continue checking out with PayPal. Please review your shipping address Processed by This merchant requires us to use the shipping address you entered on the merchant site, and there’s a problem with that address. Please go back to the site to change the address. Tt Tt 10053 amboy ave pacoima, CALIFORNIA 91331 US Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 11, 2013 Share Posted October 11, 2013 I believe the resolution to this is based on the fact that, for registered customers, CubeCart does not correctly fetch info from the geo_counties database. This bug returns the full name of the state when it should return the state's abbreviation -- and it is the abbreviation that PayPal is insisting upon. I'll search for this later (it may be here, it may be at www.cubecartforums.org), but you can try searching for the words 'state' and 'abbreviation'. Edit: Well, OK, it's the conversation we are in right now that I was referring to. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 12, 2013 Share Posted October 12, 2013 Please try this: In the file /classes/user.class.php, find the getAddresses() function. In that function, find: $address['state'] = getStateFormat($address['state_id']); Move it to just above: $addressArray[] = $address; Next, find the getDefaultAddress() function. Do the same as above. Next, using a utility such as phpMyAdmin, look at the database table CubeCart_addressbook. In the 'state' column, please determine the approximate number of records that do not have numbers in it. 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.