saleor
saleor copied to clipboard
Add a flag to `orderConfirm` to toggle whether payments / transactions should be captured
Problem
orderConfirm
always captures all payments & transactions[^1]. This might be problematic for stores that want to capture the payment when making the fulfillment (e.g. product is a preorder, charge is made on shipment)
1. General Assumptions
Capture can be skipped when making orderConfirm
mutation
Acceptance Criteria
- Add a flag to
orderConfirm
that will skip captures on payments and transactions
2. API changes
Mutations
"""
Confirms an unconfirmed order by changing status to unfulfilled.
Requires one of the following permissions: MANAGE_ORDERS.
"""
orderConfirm(
"""
ID of an order to confirm.
"""
id: ID!
"""
By default authorized payments and transactions are automatically captured
"""
captureFunds: Boolean
): OrderConfirm @doc(category: "Orders")
5. To Do list
### Tasks
- [ ] Add a draft title or issue reference here
6. To Test
- [ ]
- [ ]
[^1]: Still in progress https://github.com/saleor/saleor/issues/14346
@korycins We could also make this a setting in ChannelSettings, rather than a parameter in the mutation
@witoszekdev Yes, I agree. I discussed this with Patrys, and we will add new flag to the channel. It will determine if authorized orders should be charged when we have authorization.
Also, forgot to mention. We will first extend the channel. The orderConfirm
will get its own flag if we really get such a request from someone.
The flag for channel is described here: https://github.com/saleor/saleor/issues/15242