Files
odoo_source/addons/payment_razorpay
kcv-odoo 03cd074ee8 [IMP] payment_razorpay: authorize only when manual capture is enabled
Before this commit razorpay provider handle both authorized
and done event for transaction even though razorpay return
both authorized and done event at same time and there is no
need to handle authorize event if capture manual is disabled
on razorpay and because if handling both events at same time
it causing serialization issue and it might cause serious
issue if other operation are being executed on same time.

This commit handle authorized event only when capture manuallly
option is enabled on razorpay so it will not try to write on
operation at same time and avoid concurrency issues.

task-3652228

closes odoo/odoo#147534

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-01-08 21:58:28 +00:00
..
…

Razorpay

Implementation details

Supported features

  • Direct payment flow
  • Tokenization
  • Manual capture
  • Partial refunds
  • Several payment methods such as debit/credit cards, netbanking, UPI, and others.
  • Webhook.

API and gateway

We choose to integrate with Razorpay Recurring Payments, which is more complex to handle than Razorpay Hosted Checkout because it works as a direct payment flow, because it allows for tokenization. The other gateways were ruled out; see the original task's dev notes for the details on the other gateways.

The version of the API implemented by this module is v1.

Module history

  • The first version of the module was specified in task 2800823 and merged with PR odoo/odoo#92848 in saas-15.5.
  • The API was changed to the Recurring Payments API to support tokenization with PR odoo/odoo#143525 in 17.0.

Testing instructions

  • The partner's phone number must be a valid Indian phone number. Example: +911234567890
  • The partner's country must be India and the payment currency INR to enable India-based payment methods.

See https://razorpay.com/docs/payments/payments/test-card-upi-details/ and https://razorpay.com/docs/payments/payments/test-upi-details/ for the list of test payment details.