Fix: Fixing various bugs occured on payment lifecycle

This commit is contained in:
arvanitakis committed 2026-09-03 17:42:30 +03:00
1 parent 79e525d53f
commit e6f1ca179a
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -152,11 +152,11 @@ class CheckoutService
}
$cart = $this->cart->currentOrCreate();
$cart->meta = [...$cart->meta->toArray(), 'payment_method' => $type];
$cart->meta = [...($cart->meta?->toArray() ?? []), 'payment_method' => $type];
$cart->save();
$cart = $cart->calculate();
$cart->meta = [...$cart->meta->toArray(), 'checkout_fingerprint' => $cart->fingerprint()];
$cart->meta = [...($cart->meta?->toArray() ?? []), 'checkout_fingerprint' => $cart->fingerprint()];
$cart->save();
Event::dispatch(new PaymentMethodSelected($cart, $type));