Files
odoo_source/addons/payment_stripe/const.py
T
Prakash PrajapatiandAntoine Vandevenne 4bb840403b [REF] payment_stripe: migrate Stripe to the new payment API
This commits drops the direct payment flow supported by the SetupIntent
API in favor of the payment with redirection flow, supported by the
Checkout API only.

See the merge commit for more details.

task-2333040

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-03-30 09:25:51 +02:00

25 lines
919 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import namedtuple
# Support payment method types
PMT = namedtuple('PaymentMethodType', ['name', 'countries', 'currencies', 'recurrence'])
PAYMENT_METHOD_TYPES = [
PMT('card', [], [], 'recurring'),
PMT('ideal', ['nl'], ['eur'], 'punctual'),
PMT('bancontact', ['be'], ['eur'], 'punctual'),
PMT('eps', ['at'], ['eur'], 'punctual'),
PMT('giropay', ['de'], ['eur'], 'punctual'),
PMT('p24', ['pl'], ['eur', 'pln'], 'punctual'),
]
# Mapping of transaction states to Stripe {Payment,Setup}Intent statuses.
# See https://stripe.com/docs/payments/intents#intent-statuses for the exhaustive list of status.
INTENT_STATUS_MAPPING = {
'draft': ('requires_payment_method', 'requires_confirmation', 'requires_action'),
'pending': ('processing',),
'done': ('succeeded',),
'cancel': ('canceled',),
}