@page "/checkout" @inject NavigationManager Navigation @rendermode InteractiveServer @attribute [Authorize]
@if (IsProcessing) {

Securing Your Order

Please stand by. We are preparing your payment portal and transferring you securely to PayFast.

Bank-Grade 256-Bit SSL Connection
}
Secure Checkout

Review Your Order

@if (ShoppingCart.Items.Any() == false) {

Your cart is empty

You cannot proceed to payment without selected titles.

Browse Book Catalogue
} else {
Your Selection
@ShoppingCart.Items.Count Items
@foreach (var item in ShoppingCart.Items) {
@item.Product!.Name
By @($"{item.Author!.Name} {item.Author.LastName}")
@item.Quantity
}
Fulfillment Option
FREE
R 60.00
Delivery Instructions
Optional

Add any specific details for our dispatch team (e.g., gate access codes, complex navigation, or safe drop-off preferences).

@(OrderNotes?.Length ?? 0) / 500 characters
Billing Settings
Summary Breakdown
Items Subtotal R @ShoppingCart.TotalAmount.ToString("F2")
@if (ShoppingCart.TotalVat > 0) { Value Added Tax (VAT 15%) R @ShoppingCart.TotalVat.ToString("F2") } else { Value Added Tax (VAT) (Price is VAT inclusive) }
Fulfillment Courier Fee @if (ShippingCost == 0) { FREE } else { R @($"{ShippingCost:F2}") }

Total Due Amount
R @($"{ShoppingCart.TotalAmount + ShoppingCart.TotalVat + ShippingCost:F2}") ZAR Currency
@if (IsProcessing == true && CheckoutPayload?.Count > 0) {
@foreach (var field in CheckoutPayload) { }
}
}