diff --git a/payment.py b/payment.py index 7dc3ce3099..7c9c1174db 100644 --- a/payment.py +++ b/payment.py @@ -577,7 +577,8 @@ class Payment(CheckoutMixin, metaclass=PoolMeta): continue payment.lock() try: - if payment.stripe_token or payment.stripe_customer_source: + if ((payment.stripe_token and payment.stripe_chargeable) + or payment.stripe_customer_source): create_charge(payment) elif payment.stripe_customer_payment_method: create_payment_intent(payment) diff --git a/tests/scenario_account_payment_stripe.rst b/tests/scenario_account_payment_stripe.rst index 63d202568c..d54c0fde76 100644 --- a/tests/scenario_account_payment_stripe.rst +++ b/tests/scenario_account_payment_stripe.rst @@ -146,6 +146,7 @@ Create failing payment:: ... ) >>> Payment.write([payment.id], { ... 'stripe_token': token.id, + ... 'stripe_chargeable': True, ... 'stripe_payment_intent_id': None, # Remove intent from checkout ... }, config.context) >>> process_payment = Wizard('account.payment.process', [payment])