feat: update purchase status to pending payment in payment intent and related test
This commit is contained in:
@@ -70,6 +70,7 @@ class PurchaseController extends Controller
|
|||||||
|
|
||||||
$purchaseUpdate = [
|
$purchaseUpdate = [
|
||||||
'payment_method' => $method,
|
'payment_method' => $method,
|
||||||
|
'status' => Purchase::STATUS_PENDING_PAYMENT,
|
||||||
'total' => $totalAmount,
|
'total' => $totalAmount,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class TelepagosWebhookTest extends TestCase
|
|||||||
$user = User::factory()->create();
|
$user = User::factory()->create();
|
||||||
$variant = $this->createVariantForTenant('sonder', 10, '50.00');
|
$variant = $this->createVariantForTenant('sonder', 10, '50.00');
|
||||||
$purchase = $this->createPendingTransferPurchase($tenant, $user->id, $variant->id, 1, '12345678');
|
$purchase = $this->createPendingTransferPurchase($tenant, $user->id, $variant->id, 1, '12345678');
|
||||||
|
$purchase->update(['status' => Purchase::STATUS_CREATED]);
|
||||||
|
|
||||||
Http::fake([
|
Http::fake([
|
||||||
'https://api.telepagos.com.ar/v2/auth/token' => Http::response([
|
'https://api.telepagos.com.ar/v2/auth/token' => Http::response([
|
||||||
@@ -92,6 +93,7 @@ class TelepagosWebhookTest extends TestCase
|
|||||||
'dni' => '87654321',
|
'dni' => '87654321',
|
||||||
'transfer_payer_dni' => '23456789',
|
'transfer_payer_dni' => '23456789',
|
||||||
'payment_method' => 'transfer',
|
'payment_method' => 'transfer',
|
||||||
|
'status' => Purchase::STATUS_PENDING_PAYMENT,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user