MCPcopy Create free account
hub / github.com/dailydotdev/apps / openCheckout

Function openCheckout

packages/shared/src/contexts/payment/ChromeExtension.tsx:13–30  ·  view source on GitHub ↗
({
    priceId,
    giftToUserId,
    discountId,
  }: OpenCheckoutProps)

Source from the content-addressed store, hash-verified

11}: PropsWithChildren): ReactElement => {
12 const router = useRouter();
13 const openCheckout = ({
14 priceId,
15 giftToUserId,
16 discountId,
17 }: OpenCheckoutProps) => {
18 // Payment not available in extension
19 const params = new URLSearchParams({ priceId });
20
21 if (giftToUserId) {
22 params.append('giftToUserId', giftToUserId);
23 }
24 if (discountId) {
25 params.append('discountId', discountId);
26 }
27
28 const url = new URL(`${webappUrl}plus/payment?${params.toString()}`);
29 router.push(url.toString());
30 };
31
32 return (
33 <BasePaymentProvider

Callers 12

PlusDesktopFunction · 0.85
PlusIOSFunction · 0.85
PlusWebappFunction · 0.85
BuyCoresMobileFunction · 0.85
CoreOptionButtonFunction · 0.85
FunnelCheckoutFunction · 0.85
PlusPaymentPageFunction · 0.85
CorePageMobileCheckoutFunction · 0.85
CorePageMobileFunction · 0.85
CorePageRendererFunction · 0.85
RecruiterPaymentPageFunction · 0.85
PaymentFormFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected