Zen Cart Logo
Forums / Addon Payment Modules / Square Payment Module for Zen Cart [Support Thread]

Square Payment Module for Zen Cart [Support Thread]

Sticky

Views: 366,768

Results 361 to 380 of 835
12 Feb 2020, 11:31 AM
#361
nipinuk avatar

nipinuk

Zen Follower

Join Date:
Oct 2005
Location:
Hampshire, UK
Posts:
96
Plugin Contributions:
0

Square Payment Module for Zen Cart [Support Thread]

I've just found out today from Square that they do not offer seller protection in the UK. I know they do in the US. As we have recently had a chargeback of over £800 through fraudulent credit card use on our website, this unfortunately would stop us from using Square :( I was told there is no 3D secure on Square.

20 Feb 2020, 5:36 PM
#362
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

nipinuk:

I had that happen to me as well. My redirect URL was definitely in at Square Developer Portal. I tried using both live and sandbox access tokes to see if there was a difference but was getting "Client requires a Redirect URL to use OAuth" too.

In the end, what worked for me (if I remember correctly as it was late last night) was to use the live access token.

  1. From Zen Cart admin, Modules-Payment-Square, click on 'Log In To Your Square Account' and log on
  2. From Square Dashboard, on the left column, select 'Apps'
  3. My Apps - Manage App
  4. On left column select OAuth. Check that Redirect URL https://www.your_website/square_handler.php is there
  5. Show Application Secret and copy and paste this into Zen Cart and update

Fingers and toes crossed!

I'm having the same problem. I traced it in my logs to the following error thrown by \includes\functions\plugin_support.php on line 70:

[20-Feb-2020 11:28:32 America/Chicago] PHP Warning:  file_get_contents(https://plugins.zen-cart.com/versioncheck/156): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request

 in \www\store\includes\functions\plugin_support.php on line 70
21 Feb 2020, 12:47 AM
#363
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

So I've been tracing this problem of the Access Token Needed. I put in a lot of error_log statements to get an idea.

After some thought, I went out to the Square Developer page for my App. On the Credentials section, I changed the API Version to:

Your API Version

2018-12-05 (15 versions behind)

Which is what I found the module was written to on line 36 of "includes/modules/square.php":

protected $SquareApiVersion = '2018-12-05';

That got a log file generated when I tried the green 'Click here to log in and Authorize your account' button in the payment module configuration (Edited to remove the token data):

[20-Feb-2020 18:39:43 America/Chicago] SQUARE TOKEN REQUEST - auth code for exchange: sq0cgp-[B](data removed for security)[/B]

Array
(
    [ code] => sq0cgp-[B](data removed for security)[/B]
    [response_type] => code
    [state] => 5e4f25bc0e298
    [main_page] => index
)

But the module is still reporting '(Access Token needed)'.

21 Feb 2020, 5:42 PM
#364
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Further troubleshooting for my problem. I've narrowed down the error which has something to do with my SSL certificate?

21 Feb 2020, 7:05 PM
#365
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Went and checked my website on SSLLabs and it has a B rating with no chain issues in the certificate and says its Trusted. Help anyone?

21 Feb 2020, 11:29 PM
#366
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

Might want to screenshot that B for us. It may be that your host is still allowing a lower level of cert.

21 Feb 2020, 11:41 PM
#367
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

I saw Dr. Byte's message #347 about the beta version 1.0 and I'm going to delete my .97 version and try the 1.0.

Edit: Added a screenshot of the B rating from SSL Labs:

[Attachment no longer available]

22 Feb 2020, 6:46 PM
#368
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Okay, I installed the beta 1.0 plugin and still having the error, although the error message is more detailed (renamed my admin folder for security):

[22-Feb-2020 12:12:19 America/Chicago] Request URI: /store/myadminfolder/modules.php?set=payment&module=square, IP address: 192.168.1.1
#1  trigger_error() called at [C:\wamp\www\store\includes\functions\plugin_support.php:68]
#2  plugin_version_check_for_updates() called at [C:\wamp\www\store\includes\modules\payment\square.php:108]
#3  square->__construct() called at [C:\wamp\www\store\myadminfolder\modules.php:185]

[22-Feb-2020 12:12:19 America/Chicago] PHP Notice:  CURL error checking plugin versions: 60:SSL certificate problem: self signed certificate in certificate chain
Trying file_get_contents() instead. in C:\wamp\www\store\includes\functions\plugin_support.php on line 68

[22-Feb-2020 12:12:20 America/Chicago] Request URI: /store/myadminfolder/modules.php?set=payment&module=square, IP address: 192.168.1.1
#1  file_get_contents() called at [C:\wamp\www\store\includes\functions\plugin_support.php:70]
#2  plugin_version_check_for_updates() called at [C:\wamp\www\store\includes\modules\payment\square.php:108]
#3  square->__construct() called at [C:\wamp\www\store\myadminfolder\modules.php:185]


[22-Feb-2020 12:12:20 America/Chicago] PHP Warning:  file_get_contents(https://plugins.zen-cart.com/versioncheck/156): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request

 in C:\wamp\www\store\includes\functions\plugin_support.php on line 70

The thing is that I get my certificate from IONOS, and its not self-signed. Could it have something to do with it bouncing off my router IP (192.168.1.1)?

You can check out my certificates at https://www.ssllabs.com/ssltest/analyze.html?d=ksshedbuilder.com

22 Feb 2020, 7:33 PM
#369
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

Yep, your certificate is broadcasting TLS that are too low and cause the agent to reject you. 1.0 and 1.1 should have been gone two years ago.

22 Feb 2020, 9:11 PM
#370
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

dbltoe:

Yep, your certificate is broadcasting TLS that are too low and cause the agent to reject you. 1.0 and 1.1 should have been gone two years ago.

Okay, so I got those disabled and now am getting an "A" on SSLLabs. But still getting the CURL and ZEN-CART Version Check errors above.

22 Feb 2020, 9:25 PM
#371
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

SSLLabs Rating

[Attachment no longer available]

I had to go into the httpd-ssl.conf file and change the SSLProtocol statement to this:

SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

22 Feb 2020, 9:53 PM
#372
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

And there's another error logged when I try the green 'Click here to login and Authorize your account' button:

[22-Feb-2020 15:49:24 America/Chicago] Request URI: /store/square_handler.php?code=sq0cgp-iG_hYej0enBH0e4qghCGQg&response_type=code&state=5e51a1d763967, IP address: 192.168.1.1
#1  trigger_error() called at [C:\wamp\www\store\includes\modules\payment\square.php:643]
#2  square->exchangeForToken() called at [C:\wamp\www\store\square_handler.php:24]


[22-Feb-2020 15:49:24 America/Chicago] PHP Notice:  Exception when calling OAuthApi->obtainToken: API call to https://connect.squareup.com/oauth2/token failed: SSL certificate problem: unable to get local issuer certificate in C:\wamp\www\store\includes\modules\payment\square.php on line 643

[22-Feb-2020 15:49:24 America/Chicago] PHP Stack trace:

[22-Feb-2020 15:49:24 America/Chicago] PHP   1. {main}() C:\wamp\www\store\square_handler.php:0

[22-Feb-2020 15:49:24 America/Chicago] PHP   2. square->exchangeForToken() C:\wamp\www\store\square_handler.php:24

[22-Feb-2020 15:49:24 America/Chicago] PHP   3. trigger_error() C:\wamp\www\store\includes\modules\payment\square.php:643

[22-Feb-2020 15:49:24 America/Chicago] PHP Fatal error:  Uncaught Exception: Error Processing Request: Could not exchange auth token! in C:\wamp\www\store\includes\modules\payment\square.php:644
Stack trace:
#0 C:\wamp\www\store\square_handler.php(24): square->exchangeForToken('sq0cgp-iG_hYej0...')
#1 {main}
  thrown in C:\wamp\www\store\includes\modules\payment\square.php on line 644

This is with the beta 1.0 module, btw.

22 Feb 2020, 11:34 PM
#374
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Looked at the curltester.php, it's giving the same error.

I went out to IONOS and revoked the old certificate and renewed and installed a new one. Same error. SSLLabs still gives my website an "A".

Still the curltester.php gives these errors:

Testing communications to various destinations. This is a simple diagnostic to determine whether your server can connect to common destinations.
For advanced "details" mode, add ?details=on to the URL.

(Another resource you may find useful for testing your server's overall customer-facing SSL configuration: https://www.ssllabs.com/ssltest/index.html )
Connecting to Zen Cart Version Server (http) ...
GOOD: CURL Connection successful.

[B]Connecting to Zen Cart Version Server (https) ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Zen Cart Support Server (https) ...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to USPS (port 80)...[/B]
GOOD: CURL Connection successful.

[B]Connecting to USPS Test/Staging/Sandbox Server (port 80)...[/B]
GOOD: CURL Connection successful.

[B]Connecting to UPS (port 80)...[/B]
GOOD: CURL Connection successful.

GOOD: Socket established

[B]Connecting to UPSXML (onlinetools.ups.com) ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to UPSXML (sandbox) ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to FedEx (port 80)...[/B]
GOOD: Socket established

[B]Connecting to Canada Post REST API (SSL) ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to PayPal IPN (port 443)...[/B]
GOOD: Socket established

Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to PayPal IPN (port 443) Sandbox ...[/B]
GOOD: Socket established

Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to PayPal Express/Pro Server ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to PayPal Express/Pro Sandbox ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to PayPal Payflowpro Server ...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Cardinal Commerce 3D-Secure Server ...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to AuthorizeNet Production Server ...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to AuthorizeNet Developer/Sandbox Server ...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to First Data GGe4 server (SSL)...[/B]
Error 60: SSL certificate problem: unable to get local issuer certificate

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Payeezy Processing Server...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Payeezy Sandbox Server...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Elavon Server...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

[B]Connecting to Elavon Sandbox Server...[/B]
Error 60: SSL certificate problem: self signed certificate in certificate chain

IMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.
This error has nothing to do with Zen Cart. It is a server configuration issue.

(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)
Testing again with less security...
GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)

Testing completed. See results above. 

Why does some of these other servers also fail?

22 Feb 2020, 11:47 PM
#375
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

There's some things you just can''t do on a test server. Even our results are telling you that.> Connecting to Elavon Server...

**Error 60: SSL certificate problem: self signed certificate in certificate chainIMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.This error has nothing to do with Zen Cart. It is a server configuration issue.(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)Testing again with less security...GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.)**Connecting to Elavon Sandbox Server...Error 60: SSL certificate problem: self signed certificate in certificate chainIMPORTANT NOTE: Error 60 or 61 means that this server has an SSL certificate configuration problem. YOU NEED TO ASK YOUR HOSTING COMPANY SERVER ADMIN FOR ASSISTANCE with fixing the server's OpenSSL certificate chain.This error has nothing to do with Zen Cart. It is a server configuration issue.(If you are running this test on a localhost/PC/dev/standlone server then you can either ignore this until you put the site on a live production server, or temporarily override things by manually configuring the CURLOPT_CAINFO value with a legitimate CA bundle. If you don't know what that means, just defer your CURL testing until you are on a live production webserver!)Testing again with less security...GOOD: CURL Connection successful. (but without being able to verify certificate chain. Again: this is a server issue, not a Zen Cart issue.) ****Testing completed. See results above.

22 Feb 2020, 11:47 PM
#376
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Yeah, except I'm not using a test server.

I'm going to move my future posting of my problem over to the Curl Thread as its not related to the Square Payment module.

23 Feb 2020, 12:06 AM
#377
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

I solved my problem and thought I'd post the solution here.

I was having Curl Error 60 when trying to install the Square Payment module, and was able to fix the problem. I'm running WAMP 3.2.0, Apache 2.4.27, PHP 7.1.9.

I found the solution on this StackOverflow page:

tl-dr: In the php.ini file, find the ";curl.cainfo =" line and change it to the absolute path of your cacert.pem file. For my server it was:

curl.cainfo = "C:\wamp\bin\apache\apache2.4.27\conf\key\cacert.pem"

Thank you dbltoe for helping me troubleshoot this.

27 Feb 2020, 4:22 PM
#378
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,732
Plugin Contributions:
14

Re: Square Payment Module for Zen Cart [Support Thread]

Square Credit Card Payments - **SQ-NONCE-FAILURE

Error Log:**
PHP Notice: Exception when calling LocationsApi->listLocations: [HTTP/2 401] {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"This request could not be authorized."}]} in /home/***/public_html/shop/includes/modules/payment/square.php on line 703

On-screen error in checkout:
We could not initiate your transaction because of a problem with the card data you entered. Please correct the card data, or report this error to the Store Owner: SQ-NONCE-FAILURE

The fix:
Turn off **javascript **loading for features in the site not needed in the checkout pages.

Found in:
**includes/templates/YOUR_TEMPLATE/common/html_header.php

**also may be in tpl_header.php (not in my case with this site)

4 Mar 2020, 10:47 PM
#379
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: Square Payment Module for Zen Cart [Support Thread]

Square did a change to their API that has broken this module. Customers are seeing HTTP 500 after clicking Confirm Order on Step 3. I'm getting the following error in my logs:

[04-Mar-2020 13:37:39 America/Chicago] PHP Fatal error:  Uncaught Error: Call to undefined method SquareConnect\Configuration::callApi() in \www\store\includes\classes\vendors\square\connect\lib\Api\OAuthApi.php:134
Stack trace:
#0 \www\store\includes\classes\vendors\square\connect\lib\Api\OAuthApi.php(78): SquareConnect\Api\OAuthApi->obtainTokenWithHttpInfo(Object(SquareConnect\Model\ObtainTokenRequest))
#1 \www\store\includes\modules\payment\square.php(692): SquareConnect\Api\OAuthApi->obtainToken(Object(SquareConnect\Model\ObtainTokenRequest))
#2 \www\store\includes\modules\payment\square.php(557): square->renewOAuthToken()
#3 \www\store\includes\modules\payment\square.php(492): square->token_refresh_check()
#4 \www\store\includes\modules\payment\square.php(356): square->getAccessToken()
#5 \www\store\includes\classes\payment.php(245): square->before_process()
#6 \www\store\includes\modules\checkout_process.php(84): payment->before_process()
#7 \www\store\includes\modules\pages\checkout_process\header_php.php(14): require('\\www\\sto...')
#8 \www\store\index.php(36): require('\\www\\sto...')
#9 {main}
  thrown in \www\store\includes\classes\vendors\square\connect\lib\Api\OAuthApi.php on line 134

The last successful order I had with this module was on the 26th of February.

Unfortunately, because of this problem, I'm not able to use the Admin site Payments Module configuration page to disable this module so I can enable another. Help!

4 Mar 2020, 11:02 PM
#380
drbyte avatar

drbyte

Sensei

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

Re: Square Payment Module for Zen Cart [Support Thread]

Fjolsvith:

Square did a change to their API that has broken this module.
Um ... The error suggests that you've changed the PHP files associated with this module. If it was something Square did only on their end, the error would be different.

What's the back-story of changes to the PHP files?

Which set of files are you using? v0.9xxx? or 1.0-beta? Or a hybrid of files that you've changed independently?