Correcly cancel payments when starting a new one

This commit is contained in:
Raphael Michel
2019-03-26 09:41:03 +01:00
parent 45af18a23d
commit d4795868d6
3 changed files with 47 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ def _handle_transaction(trans: BankTransaction, code: str, event: Event=None, or
if created:
# We're perform a payment method switchign on-demand here
old_fee, new_fee, fee = change_payment_provider(trans.order, p.payment_provider, p.amount) # noqa
old_fee, new_fee, fee = change_payment_provider(trans.order, p.payment_provider, p.amount, new_payment=p) # noqa
if fee:
p.fee = fee
p.save(update_fields=['fee'])