MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / startCheckout

Function startCheckout

apps/testbed/src/App.tsx:99–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 }
98
99 function startCheckout() {
100 const total = cart.reduce((sum, i) => sum + i.price * i.qty, 0);
101 op.track('checkout_started', {
102 total,
103 item_count: cart.reduce((sum, i) => sum + i.qty, 0),
104 items: cart.map((i) => i.id),
105 });
106 navigate('/checkout');
107 }
108
109 function pay(succeed: boolean) {
110 const total = cart.reduce((sum, i) => sum + i.price * i.qty, 0);

Callers

nothing calls this directly

Calls 2

trackMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected