Fix: Fixing various bugs occured on payment lifecycle
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user