Reset payment_method when changing payment_gateway

Created on 14 December 2023, 7 months ago

Problem/Motivation

Following szenario. I have a decoupled multi-step checkout. when selecting a payment_method which has payment_details which are saved on order->pament_method, i face a problem when i want to change payment_gateway to e.q. "manual", which has no payment_details. it automatically return again a payment_instrument with the active payment_method from the beginning.

Steps to reproduce

set payment_instrument on order with a payment_gateway_id and payment_details (e.g. credit_card). after that, try to change to a payment_method, which has no payment_details (e.g. manual), you should then see no change on payment_instrument as a response.

Proposed resolution

Check if payment_gateway_id has changed, if yes, set payment_method on order to null.

Remaining tasks

apply patch

User interface changes

none

API changes

none

Data model changes

none

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany dev.tim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024