yabacon / paystack-class

A library to make Paystack API calls by including a single file or from within codeigniter.
MIT License
10 stars 21 forks source link

how to disable SSL #2

Open mannigit opened 7 years ago

mannigit commented 7 years ago

I am using on XAMP installed in local machine. I want to disable the SSL either via library function or any how.

I am getting below error.

Fatal error: Uncaught exception 'Exception' with message 'Curl failed with response: 'SSL certificate problem: unable to get local issuer certificate'.' in C:\xampp\htdocs\PHPCodes\Test\social\includes\paystack\Paystack.php:701 Stack trace: #0 C:\xampp\htdocs\PHPCodes\Test\social\includes\paystack\Paystack.php(358): PaystackHttpResponse->wrapUp() #1 C:\xampp\htdocs\PHPCodes\Test\social\includes\paystack\Paystack.php(436): PaystackHelpersCaller->callEndpoint(Array, Array, Array) #2 [internal function]: PaystackHelpersRouter->{closure}(Array) #3 C:\xampp\htdocs\PHPCodes\Test\social\includes\paystack\Paystack.php(391): call_user_func_array(Object(Closure), Array) #4 C:\xampp\htdocs\PHPCodes\Test\social\includes\verify.php(37): PaystackHelpersRouter->__call('verify', Array) #5 C:\xampp\htdocs\PHPCodes\Test\social\includes\verify.php(37): PaystackHelpersRouter->verify(Array) #6 {main} thrown in C:\xampp\htdocs\PHPCodes\Test\social\includes\paystack\Paystack.php on line 701

used the solution curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

from https://developers.paystack.co/discuss/58fa2b1616c90d2f0087be27

but not working.

ibrahimlawal commented 7 years ago

Don't disable SSL. This is payments.

Try this instead.

https://github.com/yabacon/paystack-php/wiki/cURL-error-60:-SSL-certificate-problem:-unable-to-get-local-issuer-certificate-(see-http:--curl.haxx.se-libcurl-c-libcurl-errors.html)

mannigit commented 7 years ago

Hi Ibrahim,

It worked very well. Thank you very much.

Best Regards, Manish. +91-8770548457

On Sun, Aug 27, 2017 at 2:04 AM, Ibrahim Lawal notifications@github.com wrote:

Don't disable SSL. This is payments.

Try this instead.

https://github.com/yabacon/paystack-php/wiki/cURL-error- 60:-SSL-certificate-problem:-unable-to-get-local-issuer- certificate-(see-http:--curl.haxx.se-libcurl-c-libcurl-errors.html)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yabacon/paystack-class/issues/2#issuecomment-325160417, or mute the thread https://github.com/notifications/unsubscribe-auth/AdhyAlYo_qV8Nna3ut92nGHOBv0R-M4wks5scIFugaJpZM4PB8M7 .

ibrahimlawal commented 7 years ago

Glad to be of assistance