We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signature should match
It returns error: Invalid signature passed
use \Razorpay\Api\Api; if(isset($_POST['razorpay_payment_id'])){ $rzApi = new Api(RZ_KEY, RZ_SECRET); try { $generatedSignature = $rzApi->utility->verifyPaymentSignature([ // source of error 'razorpay_order_id' => $_POST['razorpay_order_id'], 'razorpay_payment_id' => $_POST['razorpay_payment_id'], 'razorpay_signature' => RZ_SECRET // This is a constant holding my secret key ]); } catch (Exception $e) { echo $e->getMessage(); // Invalid signature passed exit; } }
v8.2
v2.9.0
For now I'm using this code which works fine
$generatedSignature = hash_hmac('sha256', $_POST['razorpay_order_id'].'|'.$_POST['razorpay_payment_id'], RZ_SECRET);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce the behavior
Expected behavior
Signature should match
Actual behavior
It returns error: Invalid signature passed
Code snippets
Php version
v8.2
Library version
v2.9.0
Additional Information
For now I'm using this code which works fine
The text was updated successfully, but these errors were encountered: