refactor(checkout): keep source cart active

This commit is contained in:
2026-08-21 13:42:30 -03:00
parent 79e721ae63
commit 1650176aa0
10 changed files with 98 additions and 216 deletions

View File

@@ -100,7 +100,7 @@ class CompleteCheckoutService
return;
}
if ($cart === null || $cart->status !== 'checkout') {
if ($cart === null || ! in_array($cart->status, ['active', 'checkout'], true)) {
throw ValidationException::withMessages([
'items' => __('api.purchase.inconsistent_reservation'),
]);