Comments (9)
Which package version are you currently at?
from razorpay-php.
@captn3m0 2.*
"razorpay/razorpay": "2.*"
from razorpay-php.
@phpnets Can you give us the output of composer show|grep razorpay
to give us the exact version?
from razorpay-php.
@captn3m0 the version is 2.0.2
from razorpay-php.
How are you reading the request JSON body?
from razorpay-php.
@captn3m0
I used below both methods both return the same (this is a Laravel project)
$requestBody = json_encode($oRequest->toArray());
OR
$requestBody = $oRequest->getContent();
the $requestBody contains data I described in the question above
for header I used this code:
$razorPaySignature = $oRequest->header('X-Razorpay-Signature');
from razorpay-php.
- Looks like you are trying to verify the webhook signature using the Key Secret. You must use the webhook secret that you have specified while setting up the webhook
- Please make sure you are getting the raw request body correctly. Our webhook requests do not contain newlines.
from razorpay-php.
@captn3m0
Yeah, the new key secret was not updated with webhook. Now It is okay. And could you please clarify that the validation will not return true if it success ? So the try catch is enough to catch the unmatched hash?
try{
$oApi->utility->verifyWebhookSignature($requestBody, $razorPaySignature, $this->RAZOR_PAY_SECRET_KEY)
}
catch(Exception $e) {
Log::info('RazorPay Webhook validation Error: '.$e->getMessage());
die;
}
Thank you for you support.
from razorpay-php.
Yes, we throw Razorpay\Errors\SignatureVerificationError
in case the signature validation fails. The method will always return null
from razorpay-php.
Related Issues (20)
- notes note coming in response of live api key HOT 1
- Get a BAD_REQUEST_ERROR on live mode with laravel 9. HOT 1
- Diners club credit card not accepted HOT 3
- Array to string conversion Error on src/Request.php HOT 3
- Valid VPA (Third party validation) giving "The requested URL was not found on the server." HOT 3
- In need of a sandbox/test account to build Razorpay integration for our software
- [Feature]: Add RazorPay to Laravel Spark replacing Stripe HOT 2
- Wordpress to 6.2 version Fatal error HOT 2
- Customer details not prefilled in razorpay payment page with paymenLink method HOT 1
- Customer already exists for the merchant while creating customer - how can i get the customer id HOT 2
- [Feature]: Example site with frontend with user registration, subscription
- Error In Wordpress if more then one plugin use Razor pay composer
- Payment Link API issue occur HOT 3
- How to Save/Add payment method HOT 1
- Can not verify payment signature. Error: invalid signature passed
- is that razorpay php sdk support auth 2.0 .. can i make calls using access token instead of using basic auth token? HOT 1
- CURL error : 60 ssl certificate problem HOT 13
- Order ID not getting with Payment Link
- Access Denied HOT 1
- Not Compatible with PHP 8.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from razorpay-php.