MikeMc68 Posted February 2, 2011 Share Posted February 2, 2011 All of a sudden, without making any changes to my store or PayPal, I am getting Payment Error messages appearing, with the following error message:Verification failure (using cURL). Returned: cURL error:GnuTLS recv error (-9): A TLS packet with unexpected length was received.The PayPal transaction could not be VERIFIED.Any ideas please? Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 3, 2011 Author Share Posted February 3, 2011 Can anyone decipher that error message and tell me what I need to do to fix this please? Thanks. Link to comment Share on other sites More sharing options...
edandrea Posted February 3, 2011 Share Posted February 3, 2011 Interesting because I am having the same problem at the same time with Virtumart. It just started.So far I can't figure out what to do about it because everybody is telling me it's not their problem, however some people have given me some helpful links and I'm getting educated. I'll pass the links on to you and if you can figure out exactly what to do, I hope you'll post your solution to give me a hand.Maybe a problem with curl on the server (suggested on Virtuemart forum) - http://curl.haxx.se/mail/lib-2010-06/0169.htmlThese guys seem to have the same problem with an event manager: http://support.wpeventticketing.com/discussion/16/anyone-here-ever-get-a-setexpresscheckout-failed-gnutls-recv-error-error/p1All of these involve Paypal specifically, but when I called PayPal they said it's my problem and they can't do anything. Link to comment Share on other sites More sharing options...
shokinro Posted February 5, 2011 Share Posted February 5, 2011 There is another thread here has similar issuehttp://www.prestashop.com/forums/viewthread/89835/I have one customer also has the same problem, he is with iPage.But when I replicate his site on my home PC, there is no problem at all.If you guy are all using iPage, then I am not 100% sure but 90% is your hosting server issue.Because the IPN data we received is correctly(you check here for detail), so you can try to comment out following two lines TEMPORARY at /modules/paypal/validation.php to avoid this error.But please note: once you remove the lines, if there is real error, you will not know. It is better to confirm you Paypal transaction for each order at this moment. if ($result != 'VERIFIED') $errors .= $paypal->getL('curlmethod').$result.' cURL error:'.curl_error($ch); Link to comment Share on other sites More sharing options...
Paul C Posted February 5, 2011 Share Posted February 5, 2011 Mike, when you say that nothing has changed are you absolutely certain your hosting has not had software or configuration changes made (by your hosting provider)?http://curl.haxx.se/mail/lib-2010-06/0169.htmlTo save you getting a sore head: Eventually I found that a call to curl_setopt($c, CURLOPT_SSLVERSION, 3) isrequired; after that it performs correctly. Paul. Link to comment Share on other sites More sharing options...
edandrea Posted February 5, 2011 Share Posted February 5, 2011 I've come to the conclusion that the problem is Ipage. I have been corresponding on several forums about this issue, and it seems to be Ipage's setup or version. Ipage was particularly unhelpful. They suggested that I might have a problem with my version of curl, but didn't want to help me with determining the version or telling me how to fix it.I copied the problem site from Ipage to my own reseller account. It worked immediately with no changes to the site. The original non-working site is at http://seattledancefusion.com - the working site is at http://dancefusion.dashhelp.com. ( There are some cosmetic changes since I moved it, but no code or data base changes) There is a world of difference in the overall performance of the site as well.One tech support person I talked to at HostGator suggested it might be an improperly installed shared ssl cert on the host. But Ipage didn't pursue that for me, so I don't know if it's a factor or not.Is anyone experiencing this with another host? Link to comment Share on other sites More sharing options...
shokinro Posted February 5, 2011 Share Posted February 5, 2011 One of my customer has the same issue and his hosting is iPage, because he is still in 30 days money back period. So I suggested him to move to other hosting company. But I guess iPage sooner or later will recognize the issue and get it fixed if more and more customer complaint. If iPage just leave it as it is, I am sure they will loose their business.While you are waiting for the fix from iPage, maybe you can use my TEMPORARY fix by change the code to avoid the error temporary, see my previous post.Or you can download my free version of AdminCarts that will help you recover your order from cart in just one click.You can get it here http://addons-modules.com/ Link to comment Share on other sites More sharing options...
edandrea Posted February 5, 2011 Share Posted February 5, 2011 The site with the problem is actually using Virtuemart and Joomla, but thanks for the link. I've never used Presta Shop, but I'm going to look at it and consider it for future customers.Thanks.BTW - I am moving the site. Ipage was no help and very unwilling to take it seriously or consider that it might be their problem. They may be a good host, but I don't have the luxury of waiting until they figure it out. You're right they will lose customers if they don't fix it. Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 11, 2011 Author Share Posted February 11, 2011 My server company is not iPage so that rules that one out. This is really frustrating now as I have to manually change every PayPal payment from Payment Error to Payment Accepted.Please help !! Link to comment Share on other sites More sharing options...
Paul C Posted February 11, 2011 Share Posted February 11, 2011 I would recommend trying the modification I posted up there ^^^. If I knew what version of Prestashop you guys werehaving this problem with I'd happily modify the code to see if it works if you're unsure as to where to put it Paul Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 12, 2011 Author Share Posted February 12, 2011 So where would I need to put that?I'm a user not a developer. Link to comment Share on other sites More sharing options...
Paul C Posted February 12, 2011 Share Posted February 12, 2011 As I said, I don't know what version or type of PayPal module you're currently using. I've attached two "fixed" modules modified from the current 1.3.6 production release that you could try and see. The archive contains the two modified paypal modules which need to replace the corresponding directories in the modules directory of your store. Just ftp them to overwrite the existing ones: Make sure you keep a copy of the originals as these might not work and you may have to revert back.PaulAs usual no guarantees, but it's certainly worth a try PayPal TLS Error.zip Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 12, 2011 Author Share Posted February 12, 2011 Thanks, i'll try that. Link to comment Share on other sites More sharing options...
Paul C Posted February 12, 2011 Share Posted February 12, 2011 I've also added code in the error message part that should output the current cURL library version and ssl version numbers - just in case you think the error has got worse if it still appears and is longer!! This info may help further if you're still having a problem.Paul Link to comment Share on other sites More sharing options...
Entcee Posted February 13, 2011 Share Posted February 13, 2011 I am using PayPal module v1.6 and Prestashop v1.2.1. This has been working for over a year and on 2/1 started getting the curl error. I am not with iPageI will try the temp solution but a perm solution would be great. Link to comment Share on other sites More sharing options...
shokinro Posted February 13, 2011 Share Posted February 13, 2011 Use the temp solution also means you temporary "ignore" the error, ignore VERIFICATION from Paypal. It might be a security problem. I don't who should take responsibility to solve the problem. Paypal? Hosting Company? Or PrestaShop? or the developer of curL? Link to comment Share on other sites More sharing options...
Troy Posted February 13, 2011 Share Posted February 13, 2011 -Edit- Misread the topic. Sorry. Link to comment Share on other sites More sharing options...
Paul C Posted February 13, 2011 Share Posted February 13, 2011 I would strongly recommend that you DO NOT disable the check, but instead perhaps try and work towards a solution. It has nothing to do with iPage or any other hosting, but to do with compatibility between components installed on the server(s) affected. You can always inform your hosting company that there appears to have been a change made to the version of system software that is causing an issue, but I suspect that they will be reluctant to install a different version unless the problem is widespread - that is the nature of shared hosting.If you server has the option of remote fopen, then it may be possible to modify the module slightly to optionally ignore cURL and use that method for verification instead. Has anyone tried the patched modules in the download link above? I can't reproduce the error, so it will be up to you guys who have the problem to try out and report back on suggested fixes... Using the sandbox would be the best option.Paul Link to comment Share on other sites More sharing options...
Paul C Posted February 13, 2011 Share Posted February 13, 2011 Here's the same changes made to the PayPal modules in 1.2.1.0 for testing.Paul PayPal TLS Error(1.2.1.0).zip Link to comment Share on other sites More sharing options...
Entcee Posted February 13, 2011 Share Posted February 13, 2011 I uploaded the modified files... will let you know how testing goes. Link to comment Share on other sites More sharing options...
shokinro Posted February 13, 2011 Share Posted February 13, 2011 If you server has the option of remote fopen, then it may be possible to modify the module slightly to optionally ignore cURL and use that method for verification instead. Has anyone tried the patched modules in the download link above? Paul, I think it is a very good suggestion. but I think if we could make following changes, the result may be even more effective. Before change (Current): if function ('curl_exec') exist, no matter error or not,the module will not try the fopen methodAfter change: if function ('curl_exec') exist and if this method error then try the "fopen" method Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 14, 2011 Author Share Posted February 14, 2011 Uploaded the PayPal files and it doesn't work. When I click on the MODULES or PAYMENT tabs now I get a blank screen as if all of the modules have dissaapeared. Deleting your PayPal folder and putting my old one back fixed this. But obviously I still have the CURL issue. Link to comment Share on other sites More sharing options...
MikeMc68 Posted February 14, 2011 Author Share Posted February 14, 2011 PayPal module I am using is v1.6 and Prestashop version is 1.3.1.1 if that helps. Link to comment Share on other sites More sharing options...
Paul C Posted February 14, 2011 Share Posted February 14, 2011 No idea why you would get the blank screen - module seems to load fine here with the same changes, although not that exact version. One of the problems is that the module version numbers don't change sometimes, even though the code has changed......Here's another try - the only change in this one is the code to attempt a fix. I downloaded the 1.3.1 version for github, so am hoping that the v1.6 in there is the same as the one you have..... paypal-1-6gtls.zip Link to comment Share on other sites More sharing options...
Entcee Posted February 14, 2011 Share Posted February 14, 2011 I uploaded the files (for 1.2.1.0) and it looks like it is now working. I uploaded them to the live site and I will know for sure once I get a few orders... I did not get the blank screen problem either. Link to comment Share on other sites More sharing options...
Paul C Posted February 14, 2011 Share Posted February 14, 2011 Cool. Will be good to know if this indeed is the problem.Paul Link to comment Share on other sites More sharing options...
Entcee Posted February 15, 2011 Share Posted February 15, 2011 Those files you provided fixed it for me... Many thanks! Link to comment Share on other sites More sharing options...
deyell Posted February 19, 2011 Share Posted February 19, 2011 Hi there, I have just completed my shop and did a test order and had this same issue. I am using Paypal version 1.7.1 and prestashop version 1.3.4.0 are you able to help me please? Thanks so much! Link to comment Share on other sites More sharing options...
Paul C Posted February 19, 2011 Share Posted February 19, 2011 The fix is actually tiny, so I'll publish what I did (in general terms) as there's just too many versions (and variations on versions) to provide files for every case:In the (non-api) paypal module, the issue is in validation.php. Taking 1.7.1 (as in the 1.7.1 in the 1.3.6 distribution which is probably very similar to the one in 1.3.4 but maybe not identical!) as an example. Around line 32 there is: curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); All we need to do is to force the SSL version, so that block of code becomes: @curl_setopt($ch, CURLOPT_POST, true); @curl_setopt($ch, CURLOPT_POSTFIELDS, $params); @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @curl_setopt($ch, CURLOPT_HEADER, false); @curl_setopt($ch, CURLOPT_TIMEOUT, 30); @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($ch, CURLOPT_SSLVERSION, 3); $result = @curl_exec($ch); You'll note that I've also added the '@' signs to the function calls - they're not essential but good practice that's been adopted in later versions anyway.Hope this helps,Paul Link to comment Share on other sites More sharing options...
deyell Posted February 21, 2011 Share Posted February 21, 2011 Hi there, thanks for your help. I downloaded that file, changed that code, saved and reuploaded however it still does the same thing ( Link to comment Share on other sites More sharing options...
Paul C Posted February 21, 2011 Share Posted February 21, 2011 Rats. What version of Prestashop and the paypal module are you using?And make sure that in your edited file the line: @curl_setopt($ch, CURLOPT_SSLVERSION, 3); Is present.Paul[edited] Link to comment Share on other sites More sharing options...
deyell Posted February 21, 2011 Share Posted February 21, 2011 I am using Paypal version 1.7.1 and prestashop version 1.3.4.0I've attached my validation.php file. validation.php Link to comment Share on other sites More sharing options...
Paul C Posted February 22, 2011 Share Posted February 22, 2011 The only thing I noticed deyell is that you're making the same call twice (probably due to the copy/paste): $result = @curl_exec($ch); $result = curl_exec($ch); I would delete the second one and test again, but otherwise it looks fine.Paul Link to comment Share on other sites More sharing options...
deyell Posted February 23, 2011 Share Posted February 23, 2011 Deleted it, still does the same! So frustrating. If you have any other ideas I'd appreciate them, otherwise I'm not really sure what to do :/Thanks so much for your help, I appreciate it. Link to comment Share on other sites More sharing options...
edandrea Posted February 23, 2011 Share Posted February 23, 2011 I gave up on this problem and changed web hosts. It was easier to move than figure it out. Link to comment Share on other sites More sharing options...
shokinro Posted February 23, 2011 Share Posted February 23, 2011 You can have a try on my paid module, there is a link at my signature.If it does not fix the your issue, I will try to fix it for you. If I am still not able to help you fix it, I can give you 100% refund. Link to comment Share on other sites More sharing options...
Paul C Posted February 24, 2011 Share Posted February 24, 2011 Deyell,Attached is a slightly modified version that first tries cURL and if that is present and fails, then it should fall back on trying to use fsockopen. This may still not help you should your host not allow fsockopen....I've modified it off the top of my head without testing (don;t have anywhere suitable to hand to test right at this moment), so no guarantees, but let me know and we can fix if required. Paul validation.php Link to comment Share on other sites More sharing options...
raychilm Posted April 22, 2011 Share Posted April 22, 2011 Has anyone checked their "connection list" in their hosting server backend? I solved this cURL validation problem by adding PayPal's IP to my outgoing IP list on my server. The error is because PayPal and your server can't "talk" to each other. Most servers have some sort of firewall/security protections on types of IP they are allowed to communicate with. It is simple a matter of adding the IP's you need to the list. (Can also be found under "trusted IP's" or "outgoing IP's" in server backend.) Once I added the appropriate IP's to my outgoing list, my payments were processed and orders appeared in backend with the status "Payment Accepted". This was the only change I made to solve the verification cURL error.List of PayPal IP's here: PayPal Current IP's Link to comment Share on other sites More sharing options...
ChrisLNZ Posted April 27, 2011 Share Posted April 27, 2011 Thanks Raychilm - useful list of IP's Link to comment Share on other sites More sharing options...
janeway Posted May 25, 2011 Share Posted May 25, 2011 Hi,I am having all sorts of trouble with the Paypal module that comes with Prestashop 1.4. First of all I am getting invalid template messagesfor Paypal. I have tried reinstalling the Paypal module, but the same error still keeps coming up.I getting my [spam-filter] to test the site while Paypal is in sandbox mode, but now, as soon as he checks out, he just gets a broken link message. I do not know what to try next.Any ideas please? My shop was on the verge of being ready up to this point. Link to comment Share on other sites More sharing options...
boylibre Posted November 8, 2011 Share Posted November 8, 2011 There is another thread here has similar issuehttp://www.prestashop.com/forums/viewthread/89835/ I have one customer also has the same problem, he is with iPage. But when I replicate his site on my home PC, there is no problem at all. If you guy are all using iPage, then I am not 100% sure but 90% is your hosting server issue. Because the IPN data we received is correctly(you check here for detail), so you can try to comment out following two lines TEMPORARY at /modules/paypal/validation.php to avoid this error. But please note: once you remove the lines, if there is real error, you will not know. It is better to confirm you Paypal transaction for each order at this moment. if ($result != 'VERIFIED') $errors .= $paypal->getL('curlmethod').$result.' cURL error:'.curl_error($ch); With regards to suppressing the error, do I have to omit this part of codes too? I tried your suggestion but it doesn't work. I still get Payment Error in my order. if (!empty($errors) AND isset($_POST['custom'])) { if ($_POST['payment_status'] == 'Pending') $paypal->validateOrder(intval($_POST['custom']), _PS_OS_PAYPAL_, floatval($_POST['mc_gross']), $paypal->displayName, $paypal->getL('transaction').$_POST['txn_id'].'<br />'.$errors); else $paypal->validateOrder(intval($_POST['custom']), _PS_OS_ERROR_, 0, $paypal->displayName, $errors.'<br />'); Link to comment Share on other sites More sharing options...
shokinro Posted November 8, 2011 Share Posted November 8, 2011 With regards to suppressing the error, do I have to omit this part of codes too? I tried your suggestion but it doesn't work. I still get Payment Error in my order what is your exact error and where does it appears. it could be caused by something else. Link to comment Share on other sites More sharing options...
boylibre Posted November 8, 2011 Share Posted November 8, 2011 Initially I get "cURL error: SSL connection timeout" error inside the order. Customer receives successful notification from Paypal but order shows "Payment Error". When I omitted that 2 lines you suggested, the error changed to "Paypal transaction could not be verified". Link to comment Share on other sites More sharing options...
shokinro Posted November 8, 2011 Share Posted November 8, 2011 I think Paul C has posted a modified version of the Paypal module, I suggest you try his version. if it still not working, I suggest upgrade to latest version of Paypal module. Or you may try to use some other paid module so that you get some support on solving your problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now