Draft
Conversation
daveearley
reviewed
Feb 14, 2026
Contributor
daveearley
left a comment
There was a problem hiding this comment.
Thanks for the effort here, @on3ss!
Still a lot of work to do before this is resilient enough to be used in a production environment
| try { | ||
| // Verify webhook signature | ||
| if (!$this->razorpayPaymentService->verifyWebhookSignature($payload, $signature)) { | ||
| throw new InvalidSignatureException('Invalid Razorpay webhook signature'); |
Contributor
There was a problem hiding this comment.
Could you please wrap any translatable strings in __(...)
Suggested change
| throw new InvalidSignatureException('Invalid Razorpay webhook signature'); | |
| throw new InvalidSignatureException(__('Invalid Razorpay webhook signature')); |
| $expectedSignature = hash_hmac( | ||
| 'sha256', | ||
| $payload, | ||
| $this->config->get('services.razorpay.webhook_secret') |
Contributor
There was a problem hiding this comment.
I don't see webhook_secret in the config, so this check isn't valid.
Comment on lines
+93
to
+100
| $this->razorpayOrdersRepository->updateByOrderId($orderId, [ | ||
| 'razorpay_payment_id' => $paymentData['id'], | ||
| 'status' => $paymentData['status'], | ||
| 'method' => $paymentData['method'], | ||
| 'amount' => $paymentData['amount'] / 100, // Convert from paise to rupees | ||
| 'currency' => $paymentData['currency'], | ||
| 'fee' => $paymentData['fee'] ?? 0, | ||
| 'tax' => $paymentData['tax'] ?? 0, |
Contributor
There was a problem hiding this comment.
Several of these columns do not exist in the DB
| try { | ||
| $order = $this->verifyRazorpayPaymentHandler->handle( | ||
| $orderShortId, | ||
| request()->all() |
Contributor
There was a problem hiding this comment.
There should be request validation here. We should also pass a typed DTO rather than an array.
| <IconWallet size={18}/> | ||
| <span>{t`Online`}</span> | ||
| </button> | ||
| {(isStripeEnabled || isRazorpayEnabled) && ( |
Contributor
There was a problem hiding this comment.
There should be distinct conditions for both Stripe and Razor pay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for creating a PR! We appreciate your contribution to Hi.Events.
To make the process as smooth as possible, please ensure you've read the contributing guidelines before proceeding.
Please include a summary of the changes and the issue being fixed or the feature being added. The more detail, the better!
Checklist
Thank you for your contribution! 🎉
Description
This PR adds support for the Razorpay payment gateway as an additional online payment option. In the settings, both STRIPE and RAZORPAY are now treated as ONLINE payment methods, allowing users to choose between them for processing online payments.
Changes Overview
Notes
Request
Looking forward to your feedback on this implementation! Please share any suggestions or concerns about the approach, architecture, or implementation details.