Server-Authoritative Totals
The order total is recomputed server-side from item prices and overwrites whatever the browser submitted, so a tampered cart cannot reach the payment processor.
A Laravel storefront built over a hosted commerce platform, where the checkout never trusts the browser with the order total.
This is a Laravel bulk ordering storefront for a packaging retailer with nine locations. Customers purchase corrugated boxes and supplies in volume, choose store pickup or delivery, and receive lower per-unit pricing as quantities increase.
The application provides the customer-facing storefront, while Ecwid manages the catalog and receives completed orders. Scheduled imports bring products and categories into MySQL, allowing pages to render from local data. Because Ecwid stores product dimensions as free-form attributes without a consistent structure, the import uses a fallback chain to resolve those values before saving them.
Checkout keeps pricing and payment verification on the server. Before creating a payment session, the application recalculates the order total from item prices and replaces the total submitted by the browser. After payment, it retrieves the session again and creates the order only when the payment status confirms settlement.
This project brings storefront development, catalog synchronization, volume pricing, fulfillment options, and payment verification together in one application. The integration gives customers a consistent ordering experience while keeping product data, payment status, and completed orders aligned across separate systems.
Carries the storefront, the checkout flow, and the scheduled imports, with Ecwid behind it as the system of record for catalog and orders.
Mirrors the catalog locally so category and product pages render without an API round trip, refreshed by a sync that upserts on the external product id.
Supplies catalog, per-location inventory, tax calculation, and order creation, consumed through six endpoints rather than writing to the platform directly.
Handles payment through a hosted checkout session, with the order held in a pending state until the session is re-read server-side and confirmed as paid.
Runs the cart, the quantity tiers, the stock conflict interface, and the delivery address check that validates a geocode before accepting it.
Builds the tax destination, reconciles the calculation response, and resolves which of the nine locations fulfils a given order.
The order total is recomputed server-side from item prices and overwrites whatever the browser submitted, so a tampered cart cannot reach the payment processor.
After payment the Stripe session is re-retrieved server-side and the order is only created once its status reads as paid, rather than trusting the success redirect.
Products import on a schedule and upsert on the external id, with dimensions pulled from free-form attributes through a three-level fallback when they are missing.
Per-unit price drops at twelve, fifty, and one hundred units, applied server-side at checkout and mirrored in the browser so the cart updates as quantity changes.
A typed address is geocoded through Google and only accepted at rooftop or interpolated precision, then measured against the delivery radius by haversine distance.