feat(purchase): restore in-review transfer lifecycle
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user