'Monthly Lunch Plan — October', 'qty' => 1, 'price' => 95.00, 'emoji' => '🍱'], ['name' => 'Morning Snack Pack × 20 days', 'qty' => 1, 'price' => 28.00, 'emoji' => '🥐'], ['name' => 'Juice Box Bundle × 20 days', 'qty' => 1, 'price' => 14.00, 'emoji' => '🧃'], ]; $currency = 'USD'; // ── End of real-app variables ───────────────────────────────────────────────── // Calculate total + build PayPal line items $total = 0.0; $ppItems = []; foreach ($cartItems as $item) { $lineTotal = $item['price'] * $item['qty']; $total += $lineTotal; $ppItems[] = [ 'name' => $item['name'], 'quantity' => (string)$item['qty'], 'unit_amount' => ['currency_code' => $currency, 'value' => number_format($item['price'], 2, '.', '')], ]; } $ppCheckout = [ 'school_name' => $schoolLabel, 'amount' => number_format($total, 2, '.', ''), 'currency' => $currency, 'items' => $ppItems, 'buyer_email' => $buyerEmail, 'page_type' => 'cart', // tells PayPal this is a cart page 'order_api_url' => './order-api.php', 'success_url' => './demo-success.php?school=' . urlencode($schoolLabel), 'cancel_url' => './demo-cart.php', ]; ?> Your Cart — <?= htmlspecialchars($schoolLabel) ?>

Your Order

item 1 ? 's' : '' ?>
Qty:
$
Order Summary
$
Total $
$schoolLabel, 'amount' => number_format($total, 2, '.', ''), 'currency' => $currency, 'placement' => 'cart', 'page_type' => 'cart', ]; require_once __DIR__ . '/paypal-paylater-message.php'; ?>
No PayPal-connected school found.
The checkout buttons appear once a school has completed PayPal onboarding. Connect one in School Merchant Setup, or open this page as ?school=<connected school name>.

Pay with card

🔒 Secured by PayPal