I'm using PHP OAuth extension to make a call to the Tradeking API. When I make the exact call as in here, https://developers.tradeking.com/documentation/php
I'm getting the exception
Exception caught! Response: making the request failed (Peer certificate cannot be authenticated with known CA certificates)
Why this is happening and how can I resolve this?
The OAuth extension uses curl to make the request. By default CURL will generally verify the SSL certificate to see if its valid an issued by an accepted CA. To do this, curl uses a bundled set of CA certificates.
You can either disable the SSL checks ($oauth->disableSSLChecks()
). Or ensure that you have a current version of curl. More information on curl certification verification.
The right solution is checking the server TIME. If it is wrong SSL doesn't work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With