saleor
saleor copied to clipboard
Prevent performing both transaction and payment checkout process at the same time
Adjust the checkout process to prevent performing both transaction and payment checkout process at the same time.
- Add validation in
transactionInitialize
andtransactionProcess
mutations - raise an error when the checkout is currently during the complete process. - Adjust the checkout flow selection:
- choose the transaction flow if:
- the checkout is fully authorized (checkout.authorize_status == CheckoutAuthorizeStatus.FULL)
- OR the checkout is not fully authorized, has transactions and there is no active payment object
- OR checkout amount is 0 and channel has
TRANSACTION_FLOW
chosen asmarked_as_paid_strategy
- choose the payment flow
- there are no transactions
- OR checkout is not fully authorized and has active payment
- choose the transaction flow if:
Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Removed API types, fields, or mutations
Docs
- [ ] Link to documentation:
Pull Request Checklist
- [ ] Privileged queries and mutations are either absent or guarded by proper permission checks
- [ ] Database queries are optimized and the number of queries is constant
- [ ] Database migrations are either absent or optimized for zero downtime
- [ ] The changes are covered by test cases
- [ ] All new fields/inputs/mutations have proper labels added (
ADDED_IN_X
,PREVIEW_FEATURE
, etc.) - [ ] All migrations have proper dependencies
- [ ] All indexes are added concurrently in migrations
- [ ] All RunSql and RunPython migrations have revert option defined