odoo/odoo#196125
Created by Karan Sharma (shka)
Merged
at 908d47eb364ca8196f1b0aab662242440a2f6e75
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:17.0-sentry-6208134651-razorpay-attributeerror-shka
- head
- 43fd0d63450aebe0d8bb0acd57da15219c9d0ea0
- merged
- 5 months ago by Sales, Antoine Vandevenne (anv)
odoo/odoo | |
---|---|
17.0 | #196125 |
saas-17.2 | #196984 |
saas-17.4 | #197152 #197136 |
18.0 | #197481 |
saas-18.1 | #197492 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
master | #197504 |
[FIX] payment_razorpay: prevent error when webhook secret is not provided
This error occurs when a user does not enter a Webhook Secret. As a result, when processing the payment, the missing secret causes the verification to fail, leading to a payment failure.
- Install the
eCommerce
module without demo data and with Indian localization. - Install
Razorpay payment provider
and activatedeveloper mode
. - Add
Key ID
andKey Secret
in Razorpay paymentprovider
. - Set up webhook in Razorpay dashboard with a random
Webhook Secret
. - Go to the
website
, add the product to the cart, and proceed to payment using
UPI
.`
Error: 'bool' object has no attribute 'encode'
This issue occurs because the Webhook Secret is missing, returning False and causing payment verification to fail.
This commit solves the error by handling missing Webhook Secret
values by
logging a warning and skipping the signature check instead of returning a False.
Sentry: 6208134651
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr