WellVera Pharma — Peptide E-Commerce & Affiliate Platform
A full-stack Laravel + Inertia.js e-commerce platform for a Malaysian peptide supplement brand, featuring a custom affiliate/commission system, a dynamic landing-page builder, CHIP payment integration, and a full admin panel for orders, customers and reporting.
Overview
WellVera Pharma is a full-stack e-commerce and affiliate platform built for a Malaysian peptide supplement brand (wellverapharma.com). It combines a public storefront with CMS-driven landing pages, a multi-tier affiliate and commission system, CHIP hosted-checkout payments, and a role-based admin panel covering orders, customers, products, affiliates, marketing materials, and date-filtered reporting with Excel/PDF export. Built with Laravel and Vue via Inertia.js.
Key Features
- Dynamic landing-page builder with CMS-controlled copy, media slots, and per-page product/package binding — sales pages editable without code changes.
- Multi-tier affiliate system with referral tracking, commission calculation, approval workflow, withdrawal requests, and rolled-up sales/commission totals per affiliate.
- CHIP hosted-checkout payment integration with RSA-signature webhook verification, automatic order status transitions, and a payment-failed recovery flow.
- Role-based admin panel (super admin / admin / staff) covering orders, customers, products, commissions, affiliates, CMS pages, marketing materials, and landing pages.
- Excel/CSV export and print-to-PDF reports for sales, revenue, top packages, and top affiliates — all respecting active date filters.
- Session-gated order pages (thank-you, payment-failed, receipt) that prevent enumeration of other customers' orders.
Challenges & Solutions
The CHIP payment gateway returns its RSA public key as a root JSON string rather than a nested object, causing webhook signature verification to silently fail for every payment — fixed by reading $response->json() directly instead of $response->json('public_key').
Inertia’s XHR client cannot follow external redirects to CHIP’s hosted checkout, so the checkout form is submitted as a native HTML POST; validation errors and entered values are restored into the Vue form on redirect-back via Laravel’s old() helper passed as an Inertia prop.
A multi-image landing page used storage-backed URLs that broke on server migration — resolved by clearing the media DB column so the template falls back to versioned public assets deployed via git.
Results & Impact
?? Add real outcomes (orders, revenue, affiliate sign-ups) when available.