fixed order total

This commit is contained in:
Edward Yang 2022-07-28 13:59:54 +08:00
parent 9f6ad09ef8
commit db43cfa8a3
1 changed files with 2 additions and 1 deletions

View File

@ -106,6 +106,7 @@ class OrderRepo
$current = $data['current'] ?? [];
$carts = $data['carts'] ?? [];
$totals = $data['totals'] ?? [];
$orderTotal = collect($totals)->where('code', 'order_total')->first();
$shippingAddressId = $current['shipping_address_id'] ?? 0;
$paymentAddressId = $current['payment_address_id'] ?? 0;
@ -126,7 +127,7 @@ class OrderRepo
'email' => $customer->email,
'calling_code' => $customer->calling_code ?? 0,
'telephone' => $customer->telephone ?? '',
'total' => $carts['amount'],
'total' => $orderTotal['amount'],
'locale' => locale(),
'currency_code' => current_currency_code(),
'currency_value' => 1,