// Stripe Integration Script // Initialize Stripe with your publishable key const stripe = Stripe('pk_test_51P8KpGDMHO4ZxtzFDMHO4ZxtzFDMHO4ZxtzF'); // Replace with your actual publishable key const elements = stripe.elements({ appearance: { theme: 'stripe', variables: { colorPrimary: '#6366f1', // indigo-500 colorText: '#1f2937', // gray-800 colorBackground: '#ffffff', colorDanger: '#ef4444', // red-500 }, rules: { '.Input': { borderColor: '#d1d5db', // gray-300 borderRadius: '0.5rem', boxShadow: 'none', }, '.Input:focus': { borderColor: '#6366f1', // indigo-500 boxShadow: '0 0 0 3px rgba(99, 102, 241, 0.3)', }, } } }); // Create and mount the Payment Element const paymentElement = elements.create('payment', { layout: { type: 'tabs', defaultCollapsed: false, radios: false, spacedAccordionItems: false }, paymentMethodOrder: ['card', 'klarna', 'afterpay_clearpay', 'affirm'], wallets: { applePay: 'never', googlePay: 'never' } }); paymentElement.mount('#payment-element'); // Handle form submission const submitButton = document.getElementById('submit-button'); const errorMessage = document.getElementById('error-message'); submitButton.addEventListener('click', async (e) => { e.preventDefault(); // Disable the button and show loading state submitButton.disabled = true; submitButton.innerHTML = `