Loan (LSE) fd0d077a7a [FIX] pos_stripe: use payment provider method for payment capture
Before this commit:
 If you make a PoS payment using a Stripe terminal, you will have
 the following JS Traceback:
 ```js
 TypeError: Cannot read properties of undefined (reading 'data')
    at Proxy.captureAfterPayment
 ```

 This happens on the line:
 `capturePayment.charges.data[0].payment_method_details.card_present.brand;`
 It occurs as Stripe API most recent version does not provide the
 `charges` value anymore.
 > The charges property on PaymentIntent has been removed
 source:
 https://stripe.com/docs/upgrades#2022-11-15

After this commit:
 We skip the data if not mentioned on the JS side.
 In addition of that, we use the `_stripe_make_request`
 method of the Stripe payment provider as it
 force in its header to use a certain Stripe API version
 compatible with the features that we are looking for.

opw-3097460

closes odoo/odoo#108851

X-original-commit: 6a6057caf63d7e6a60dac190b2ea1ebb954d8f6a
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-12-30 17:24:49 +01:00
2022-12-13 17:03:17 +01:00
2022-12-24 14:24:18 +01:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%