@extends('layouts.app') @section('title', 'Checkout') @section('content') @php $rzEnabled = $gateways['razorpay']['enabled'] ?? true; $codEnabled = $gateways['cod']['enabled'] ?? true; $transferEnabled = $gateways['transfer']['enabled'] ?? true; $rzKey = $gateways['razorpay']['keyId'] ?? ''; $hasBilling = $currentCustomer && is_array($currentCustomer->billing_address) && ($currentCustomer->billing_address['street'] ?? ''); $splitCfg = $gateways['split_payment'] ?? []; $splitEnabled = (bool) ($splitCfg['enabled'] ?? false); $splitMin = (int) ($splitCfg['min_amount'] ?? 5000); $splitPct = (int) ($splitCfg['max_percent'] ?? 50); $splitAvailable = $splitEnabled && $rzEnabled && $cartTotal >= $splitMin; $defaultPm = old('payment_method', 'razorpay'); @endphp

Secure Express Checkout

@if(!$currentCustomer) {{-- Returning Customer Login --}}

Returning Customer?

Login to auto-fill your saved billing address and track your order from your user panel.

@csrf
I'm a new customer
Placed an order before? Check your inbox for your account email with your temporary password.
@endif
@csrf
{{-- Delivery Details --}}

Shipping & Delivery Destination

{{-- Payment Method --}}

Select Payment Method

@if($rzEnabled) @endif @if($codEnabled) @endif @if($splitAvailable) @endif @if($transferEnabled) @endif
{{-- Order Summary --}}

Order Summary

@foreach($cartItems as $item)
{{ $item['product']->name }}
{{ $item['product']->name }}
Qty: {{ $item['quantity'] }} × ₹{{ number_format($item['unit_price'], 2) }}
₹{{ number_format($item['unit_price'] * $item['quantity'], 2) }}
@endforeach
@if($appliedCoupon)
Coupon: {{ $appliedCoupon->code }} applied @csrf
@endif
Subtotal ₹{{ number_format($cartSubtotal, 2) }}
@if($cartDiscount > 0)
Discount {{ $appliedCoupon ? '(' . $appliedCoupon->code . ')' : '' }} - ₹{{ number_format($cartDiscount, 2) }}
@endif
Shipping {{ $cartShipping > 0 ? '₹' . number_format($cartShipping, 2) : 'FREE' }}
Total Payable ₹{{ number_format($cartTotal, 2) }}
@if($splitAvailable)
Deposit today ({{ $splitPct }}%) ₹{{ number_format(round($cartTotal * $splitPct / 100, 2), 2) }}
Balance on delivery ({{ 100 - $splitPct }}%) ₹{{ number_format(round($cartTotal * (100 - $splitPct) / 100, 2), 2) }}
@endif

Your payment & personal details are encrypted and secure.

@endsection