Allow configuring a webhook in Stripe to send s2s notifications to Odoo when a Checkout payment is completed. Note that SetupIntent and PaymentIntent events are not listened to, since they are handled 'live' with the customer actively present; the main use case for Stripe webhooks is a Checkout session that gets interrupted before the customer is redirected to Odoo (e.g. network loss, browser crash, closing the tab, etc.) The webhook should be configured to send its events to <base_url>/payment/stripe/webhook and should only subscribe to checkout.session.completed events to avoid spamming the Odoo server with useless notifications. closes odoo/odoo#52754 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
23 lines
1.2 KiB
XML
23 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="acquirer_form_stripe" model="ir.ui.view">
|
|
<field name="name">payment.acquirer.form.inherit</field>
|
|
<field name="model">payment.acquirer</field>
|
|
<field name="inherit_id" ref="payment.acquirer_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr='//group[@name="acquirer"]' position='inside'>
|
|
<group attrs="{'invisible': [('provider', '!=', 'stripe')]}">
|
|
<field name="stripe_secret_key" attrs="{'required':[ ('provider', '=', 'stripe'), ('state', '!=', 'disabled')]}" password="True"/>
|
|
<field name="stripe_publishable_key" attrs="{'required':[ ('provider', '=', 'stripe'), ('state', '!=', 'disabled')]}" password="True"/>
|
|
<field name="stripe_webhook_secret" password="True"/>
|
|
</group>
|
|
</xpath>
|
|
<xpath expr='//group[@name="acquirer_config"]' position='after'>
|
|
<group attrs="{'invisible': [('provider', '!=', 'stripe')]}">
|
|
<field name="stripe_image_url"/>
|
|
</group>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|