[tcb-script src=”https://js.stripe.com/v3″][/tcb-script] Checkout[tcb-script](function() { var stripe = Stripe(‘pk_live_M2MP0n8zUzzcdzJo2BDFsVBR’); var checkoutButton = document.getElementById(‘checkout-button-price_1HzwJxHsePUX5ZdB0gf4eCo4’); checkoutButton.addEventListener(‘click’, function () { /* * When the customer clicks on the button, redirect * them to Checkout. */ stripe.redirectToCheckout({ lineItems: [{price: ‘price_1HzwJxHsePUX5ZdB0gf4eCo4’, quantity: 1}], mode: ‘subscription’, /* * Do not rely on the redirect to the successUrl for fulfilling * purchases, customers may not always reach the success_url after * a successful payment. * Instead use one of the strategies described in * https://stripe.com/docs/payments/checkout/fulfill-orders */ successUrl: ‘http://biohack.ae/success’, cancelUrl: ‘http://biohack.ae/canceled’, }) .then(function (result) { if (result.error) { /* * If `redirectToCheckout` fails due to a browser or network * error, display the localized error message to your customer. */ var displayError = document.getElementById(‘error-message’); displayError.textContent = result.error.message; } }); });})();[/tcb-script]