feat(purchase): restore in-review transfer lifecycle

This commit is contained in:
2026-08-21 16:15:55 -03:00
parent dc0fbe06b8
commit 5548fe8511
11 changed files with 130 additions and 14 deletions

View File

@@ -55,6 +55,10 @@ class CompleteCheckoutService
return $this->loadPurchase($purchase);
}
if ($purchase->status === Purchase::STATUS_IN_REVIEW) {
return $this->loadPurchase($purchase);
}
$this->purchaseState->lockCurrentCart($purchase);
if (
@@ -66,7 +70,10 @@ class CompleteCheckoutService
]);
}
$purchase->update(['expires_at' => null]);
$purchase->update([
'status' => Purchase::STATUS_IN_REVIEW,
'expires_at' => null,
]);
$this->reservations->syncPurchaseExpiration($purchase);
return $this->loadPurchase($purchase);
@@ -171,6 +178,7 @@ class CompleteCheckoutService
{
return in_array($purchase->status, [
Purchase::STATUS_PAID,
Purchase::STATUS_IN_REVIEW,
Purchase::STATUS_CANCELLED,
Purchase::STATUS_REJECTED,
Purchase::STATUS_EXPIRED,