1window.initializeStripeCheckout = async (stripeKey, clientToken) => { 2 if (stripeKey === null || stripeKey === "") { 3 console.debug("Missing stripeKey"); 4 return; 5 } 6 7 const stripe = Stripe(stripeKey); 8 // Stripe docs recommend to use fetchClientSecret for this (clientSecret is deprecated) 9 // See: https://docs.stripe.com/js/embedded_checkout/init#embedded_checkout_init-options 10 const fetchClientSecret = () => new Promise((resolve, _) => { resolve(clientToken); }); 11 12 const checkout = await stripe.initEmbeddedCheckout({ 13 fetchClientSecret, 14 }); 15 16 checkout.mount("#checkout-container"); 17};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.