01e07fb0dbc3fc43a15074b72b45acf2505e90a7
Based on 50a91e0c531ec05a432cd8c468b74db27bd30985. By default
pos_stripe does the authorization and capture in two steps. This is
not supported for eftpos payments [1]. It can be supported in two
ways:
- always auth + capture in one step with the `automatic`
`capture_method`, or
- only auth + capture when manual isn't possible with the
`manual_preferred` `capture_method`
Although both could work, `manual_preferred` was chosen because:
- it's a bit simpler to figure out whether to capture the payment in
the frontend (we can just check card_present.brand),
- this keeps non-eftpos transactions the same, which is more in line
with our stable policy
For completeness pos_restaurant_stripe was updated to not capture
these eftpos payments, although this style of tipping isn't used in
Australia.
To test similar steps as in 50a91e0c531ec05a432cd8c468b74db27bd30985
need to be taken:
1/ use an Australian Stripe account,
2/ allow discovery of simulated readers by passing {simulated: true}
to this.terminal.discoverReaders()
3/ manually simulating an eftpos payment via the browser
console (necessary per payment) [2]
To be safe this also guards against the possibility of there being no
`charges` key on the payment intent. This was done elsewhere with
6a6057caf63d7e6a60dac190b2ea1ebb954d8f6a. It does seem that Stripe
rolled back this change (maybe only for Stripe Terminal intents),
because I always receive `charges` with the latest API
version (2023-10-16). Additionally,
50a91e0c531ec05a432cd8c468b74db27bd30985 has been live for 3 months
without issues, it would have caused errors if `charges` was missing.
[1] https://stripe.com/docs/terminal/payments/regional?integration-country=AU#integration-requirements
[2] posmodel.payment_methods[X].payment_terminal.terminal.setSimulatorConfiguration({testPaymentMethod: 'eftpos_au_debit'})
opw-3523604
closes odoo/odoo#142603
closes odoo/odoo#145665
X-original-commit: ffddab3aa437c997fd1d63d592b47598a4bad9f5
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Joren Van Onder (jov) <jov@odoo.com>
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%