Jump to content

PayPal problems


Recommended Posts

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

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.html

These 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/p1

All 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

There is another thread here has similar issue
http://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

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.html

To save you getting a sore head:

Eventually I found that a call to curl_setopt($c, CURLOPT_SSLVERSION, 3) is
required; after that it performs correctly.


Paul.
Link to comment
Share on other sites

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

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

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

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. :D

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.

Paul

As usual no guarantees, but it's certainly worth a try :D

PayPal TLS Error.zip

Link to comment
Share on other sites

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

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


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 method


After change:
if function ('curl_exec') exist and if this method error then try the "fopen" method
Link to comment
Share on other sites

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

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

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

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

  • 1 month later...

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

  • 4 weeks later...

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

  • 5 months later...
There is another thread here has similar issue

http://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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...