Open infohappycoders opened 9 months ago
I am also facing same problem.
Fatal error: Uncaught WpOrg\Requests\Exception: cURL error 60: SSL certificate problem: unable to get local issuer certificate in /var/www/html/php-razorpay/vendor/rmccue/requests/src/Transport/Curl.php on line 490
WpOrg\Requests\Exception: cURL error 60: SSL certificate problem: unable to get local issuer certificate in /var/www/html/php-razorpay/vendor/rmccue/requests/src/Transport/Curl.php on line 490
while creating order
I am struggling with this problem during development from last few days. I try to update all cacert.pem file. But fail to get result. I am using http as well as https for localhost.
This is the issue on Razorpay server side. No response from razorpay team.
Finally found the solution. Follow the below solution to fix the error.
Download the latest certificate from razorpay and add inside your vendor razorpay code https://razorpay.com/docs/security/whitelists/#ssl-certificates
Add the certificate in to the bottom of the file :
vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem
Path : vendor/razorpay/razorpay/src/request.php
$options = array(
'auth' => array(Api::getKey(), Api::getSecret()),
'hook' => $hooks,
'timeout' => 60,
);
Change the code to
$options = array(
'auth' => array(Api::getKey(), Api::getSecret()),
'hook' => $hooks,
'timeout' => 60,
'verify' => true
);
After these two changes it will work. If any one need help let me know TLS Certificate Updates.pdf
@infohappycoders Brother is this any possibility to use sdk function to make call by using Oauth2.0 accessToken ?
@infohappycoders Brother is this any possibility to use sdk function to make call by using Oauth2.0 accessToken ?
Could you please provide more information. We are using api call by razorpay key and secret. Oauth no needed
@infohappycoders Brother i want to use use the sdk with the access token get from the Oauth 2.0 flow.
I just want to init a client of Razorpay php SKD by using Oauth2.0 access token instead of Basic Oauth which uses key and secret..
hope you understand if not then please tell me i will provide more info about it..
@infohappycoders Thanks for the solution. But I was not able to find vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem Can you help?
@infohappycoders Thanks for the solution. But I was not able to find vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem Can you help?
Please download the latest repository version from git. I think you are using very older version. Just download the latest version here and replace razorpay folder. It's need minimum php version 7.3
hope you understand if not then please tell me i will provide more info about it..
Sorry , You need to check with Razorpay support team.
@infohappycoders Thanks for the solution. But I was not able to find vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem Can you help?
Please download the latest repository version from git. I think you are using very older version. Just download the latest version here and replace razorpay folder. It's need minimum php version 7.3
Thanks it is working for me now. It was a big issue for me. Tried many solutions and yours is working.
@infohappycoders Thanks for the solution. But I was not able to find vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem Can you help?
Please download the latest repository version from git. I think you are using very older version. Just download the latest version here and replace razorpay folder. It's need minimum php version 7.3
Thanks it is working for me now. It was a big issue for me. Tried many solutions and yours is working.
Happy to hear 😊
hope you understand if not then please tell me i will provide more info about it..
Sorry , You need to check with Razorpay support team.
Okay thanks for coordinating.
Finally found the solution. Follow the below solution to fix the error.
Download the latest certificate from razorpay and add inside your vendor razorpay code https://razorpay.com/docs/security/whitelists/#ssl-certificates
Add the certificate in to the bottom of the file :
vendor/razorpay/razorpay/libs/Requests-2.0.4/certificates/cacert.pem
Path : vendor/razorpay/razorpay/src/request.php
$options = array( 'auth' => array(Api::getKey(), Api::getSecret()), 'hook' => $hooks, 'timeout' => 60, );
Change the code to
$options = array( 'auth' => array(Api::getKey(), Api::getSecret()), 'hook' => $hooks, 'timeout' => 60, 'verify' => true );
After these two changes it will work. If any one need help let me know TLS Certificate Updates.pdf
still working with cakePHP too
Steps to reproduce the behavior
I'm getting below error on order create. PHP 7.3 LARAVEL 5.6 Razorpay latest library
Error : CURL error 60: SSL certificate problem: unable to get local issuer certificate
I have already added the whitelisted key .
Expected behavior
Curl failed due to SSL verify issue
Actual behavior
Curl get response when order create
Code snippets
No response
Php version
7.3
Library version
2.8.4
Additional Information
No response