the generic sdk PHP works from an SSL hosted server however, I can’t test stuff there. I’m using WAMP with a self signed cert. The SSL secure trusted etc https works locally on Wamp but when I try processing a payment (SDK w/o mods) using the new ‘Web Payments SDk’ I get this cert error. The previous square version works perfectly here locally. I need to test locally for efficiency and quicker trouble shooting the code. I’m hoping it’s something simple for anyone who uses WAMP and has fixed this issue
the complete error is
Square\Exceptions\ApiException: SSL certificate problem: unable to get local issuer certificate in C:\wamp64\www\Square\vendor\square\square\src\Apis\LocationsApi.php on line 205
BTW - our production version of V1 works here locally without issue. I need the v2 to also work here too so I can migrate what’s already written (our stuff)
I’m not entirely sure how to resolve this but I found this solution this uses WAMP.
that appears to be for a curl or GIT request (it didn’t work). All my SSL stuff works fine including the V1 version of square credit card payments. The new version is causing a problem. When I try to open the square/index.php it fails on wamp but not on the hosted server. It’s too slow to work with on the hosted server.
This error isn’t being caused by Wamp, it’s being caused by something in the SDK while trying to load the credit card form.
Also, why can’t I use “include” to include the square index.php in my software. It fails. It only works if I use a button (click) to access it then all the vars are lost and I have a lot of work to do after I get square approval. It’s not real smooth like the previous version… like it’s broken
I guess the better question is - do you have a PHP APK that can plug and replace the old version instead of me having to rewrite a ton of code. Nothing works yet. Very frustrating
BTW - I do appreciate your effort. It really doesn’t make sense why the newer version doesn’t plug-n-play at all.
This error typically occurs because the client does not trust the self-signed certificate. To resolve it, you need to add the self-signed certificate to the trusted certificate store on your local machine.This can be done through the Windows certificate manager by importing the certificate into the “Trusted Root Certification Authorities” folder.
Additionally, make sure to configure WAMP to use the SSL certificate by updating the Apache configuration file with the correct paths to the certificate and private key. After restarting WAMP, the client should recognize the self-signed certificate as trusted, allowing you to test and troubleshoot your code locally.