Zen Cart Logo
Forums / Addon Payment Modules / Curl error in Netregistry Payment module

Curl error in Netregistry Payment module

Views: 3,175

Results 1 to 11 of 11
16 Apr 2013, 8:49 AM
#1
jld avatar

jld

New Zenner

Join Date:
Dec 2007
Posts:
37
Plugin Contributions:
0

Curl error in Netregistry Payment module

Hi,

I really need help please :shocking:

My shop used a Netregistry module to act as a gateway between my ZenCart and my bank to process credit card payments. This module has worked well for the last 5+ years.

Last week my shop stopped processing credit card payments. I have not changed anything in my shop so I know it is not me.

What happens is:

When a customer clicks on Confirm order they get a blank page (white) and in the URL bar the following appears:

https://www.horsemansshop.com.au/index.php?main_page=checkout_payment&error_message=We+are+currently+unable+to+process+your+card.+Please+try+again.

When I turned on the debug mode the following appears in the screen

Note I have replaced my account number and password with ## but they are correct

DEBUG INFORMATION:

Parameters sent to NetRegistry: COMMAND=purchase&LOGIN=####/##########&AMOUNT=124.40&CCNUM=4601843900295443&CCEXP=04/17&COMMENT=-20130415115212

Status of transaction:

Full response from NetRegistry:

CURL error number: 56

CURL error message: Recv failure: Connection reset by peer

CURL information: Array
(
[url] => http://4tknox.au.com/cgi-bin/themerchant.au.com/ecom/external2.pl
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 284
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 1.065219
[namelookup_time] => 0.562168
[connect_time] => 0.797227
[pretransfer_time] => 0.797236
[size_upload] => 117
[size_download] => 0
[speed_download] => 0
[speed_upload] => 109
[download_content_length] => -1
[upload_content_length] => 117
[starttransfer_time] => 0
[redirect_time] => 0
)

Can anyone help me with this My hosting company is saying the error is with Net Registry and Netregistry is saying the error is with the host server

Please help me

Johanne

16 Apr 2013, 2:32 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Curl error in Netregistry Payment module

You can try running from a browser (this assumes that your shop is at the root)

your_domain.xxx/extras/curltester.php

16 Apr 2013, 9:11 PM
#3
jld avatar

jld

New Zenner

Join Date:
Dec 2007
Posts:
37
Plugin Contributions:
0

Re: Curl error in Netregistry Payment module

Hi

Thanks for your reply. I tried what you said and the results are below

Does this mean that my shop is working OK? and if so what should I do now?

Powered by Zen Cart :: The Art of E-Commerce
CURL Test Page
This page is intended for testing CURL behaviour. You should be accessing this page via CURLTESTER.PHP running on YOUR server.
You submitted the following fields and data:
Array
(
[field1] => This is a test
[statuskey] => ready
)
Data validation
Good
Other Info
Your server IP address is: 69.94.36.25.
Your system identifies itself as: Zen Cart(tm) - CURL TEST
Copyright © 2003 - 2013 Zen Ventures, LLC - Powered by Zen Cart™
Array
(
[url] => "http://www.zen-cart.com/testcurl.php"
[content_type] => text/html
[http_code] => 200
[header_size] => 179
[request_size] => 212
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 4.140537
[namelookup_time] => 4.033659
[connect_time] => 4.086591
[pretransfer_time] => 4.086601
[size_upload] => 37
[size_download] => 2180
[speed_download] => 526
[speed_upload] => 8
[download_content_length] => 2180
[upload_content_length] => 37
[starttransfer_time] => 4.140468
[redirect_time] => 0
)

16 Apr 2013, 10:12 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Curl error in Netregistry Payment module

ZenCart tester:

[url] => "http://www.zen-cart.com/testcurl.php"
[content_type] => text/html
[B][http_code] => 200[/B]

Your gateway test results:

[url] => http://4tknox.au.com/cgi-bin/themerchant.au.com/ecom/external2.pl
[content_type] =>
[B][http_code] => 0[/B]

What this says it that curl is ok on the server BUT your gateway http code is "0" or not connecting

16 Apr 2013, 10:28 PM
#5
jld avatar

jld

New Zenner

Join Date:
Dec 2007
Posts:
37
Plugin Contributions:
0

Re: Curl error in Netregistry Payment module

Sorry to sound so thick but..

My server is OK but the gateway (NetRegistry) is not allowing connection?

Johanne

16 Apr 2013, 10:51 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Curl error in Netregistry Payment module

jld:

CURL error number: 56

CURL error message: Recv failure: Connection reset by peer

...

My hosting company is saying the error is with Net Registry and Netregistry is saying the error is with the host server
It's a communications issue. And since you said the problem "suddenly started after years of working fine", that suggests that it's most likely a problem caused by something that was upgraded on either your host's server or the netregistry servers. It's unsurprising that they'd blame each other, because it's a pretty complicated error to troubleshoot.
http://stackoverflow.com/questions/10285700/curl-error-recv-failure-connection-reset-by-peer-php-curl

You didn't say where you got the netregistry module, so it's hard to take a look at the code in the module to know whether there's something that one could tweak inside it "just in case".

16 Apr 2013, 11:35 PM
#7
jld avatar

jld

New Zenner

Join Date:
Dec 2007
Posts:
37
Plugin Contributions:
0

Re: Curl error in Netregistry Payment module

Hi The Net Registry Module was provided by Net Registry initially when I signed up.

I might ask them for a current version and compare them to see if they are the same.

Would that be the right way to go?

Thank you for helping me I really appreciate it.

Johanne

16 Apr 2013, 11:46 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Curl error in Netregistry Payment module

It's worth a try, to see if they have a newer module.
If they don't, or even if it takes them awhile to respond, perhaps you can post your current module's file here. Zip it and attach it here. It's the file in your /includes/modules/payment/ folder. If it's written correctly there will not be any sensitive info in it, so no reason it should be safe to post.

The code in the module can be used to do a simulation of a transaction, to test connection to the gateway, at the very least.

16 Apr 2013, 11:47 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Curl error in Netregistry Payment module

kobra:

You can try running from a browser (this assumes that your shop is at the root)

your_domain.xxx/extras/curltester.php

I would suggest you also run it with ?ssl=1 at the end:

your_domain.xxx/extras/curltester.php?ssl=1

and try a test for PayPal, too, just to see what it does:

your_domain.xxx/extras/curltester.php?paypal=1

17 Apr 2013, 6:49 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Curl error in Netregistry Payment module

jld:

Last week my shop stopped processing credit card payments. I have not changed anything in my shop so I know it is not me.
<snip>
CURL error number: 56
<snip>
Can anyone help me with this My hosting company is saying the error is with Net Registry and Netregistry is saying the error is with the host server

Are you still experiencing the problem?

I ask, because I've made the following observations.

  1. cURL error number 56 is generally related to SSL issues.
  2. Your sites SSL certificate has very recently been updated (Issued 14/4/2013), just two days before posting your message.

This means that orders placed 'last week' may have been done while you had an invalid/expired certificate, which will explain why it stopped working.

However, since the 14th you have had a valid certificate, which means things should be working again now! Are they?

Cheers
Rod

17 Apr 2013, 7:09 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Curl error in Netregistry Payment module

jld:

[url] => http://4tknox.au.com/cgi-bin/themerchant.au.com/ecom/external2.pl
Agreeing with RodG that error 56 is typically an SSL issue. Hence the request to see the code.
And I also note that your CURL log shows that you're connecting to your gateway over http, not https. Wondering why you're doing that.