Skip to content

Feature/razorpay#1038

Draft
on3ss wants to merge 6 commits intoHiEventsDev:developfrom
on3ss:feature/razorpay
Draft

Feature/razorpay#1038
on3ss wants to merge 6 commits intoHiEventsDev:developfrom
on3ss:feature/razorpay

Conversation

@on3ss
Copy link
Contributor

@on3ss on3ss commented Feb 10, 2026

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

  • I have read the contributing guidelines.
  • My code is of good quality and follows the coding standards of the project.
  • I have tested my changes, and they work as expected.

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

  • Integrated Razorpay as a new online payment gateway
  • Updated payment settings to treat STRIPE and RAZORPAY as mutually exclusive online payment options
  • Modified payment flow logic to accommodate the new gateway choice
  • This is a significant change that affects core payment processing behavior

Notes

  • ✅ SAAS mode implementation is still pending
  • ✅ Refund functionality needs to be added
  • ✅ Further improvements will be made based on feedback

Request

Looking forward to your feedback on this implementation! Please share any suggestions or concerns about the approach, architecture, or implementation details.

Copy link
Contributor

@daveearley daveearley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several of these columns do not exist in the DB

try {
$order = $this->verifyRazorpayPaymentHandler->handle(
$orderShortId,
request()->all()
Copy link
Contributor

@daveearley daveearley Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) && (
Copy link
Contributor

@daveearley daveearley Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be distinct conditions for both Stripe and Razor pay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants