--> display: none; /* Hide PayPal button initially */ 0 sidebar
chillzrestaurant X
--> -->
--> // Update amount based on the number of guests selected amount = guests * 10; // £10 per person checkFormValidity(); // Check if form is valid after amount update // Check if all form fields are filled to show the PayPal button // Check if all required fields are filled paypalButtonContainer.style.display = 'block'; // Show PayPal button paypalButtonContainer.style.display = 'none'; // Hide PayPal button // Form validation // Initialize PayPal Buttons // Ensure the amount is correctly calculated return; // Don't proceed if amount is 0 //console.log("Creating PayPal order with amount: ", amount); //console.log("Created PayPal Order ID: ", orderID); //console.log('Payment successfully captured: ', details); // Prepare form data for AJAX submission formData.append('amount', amount.toFixed(2)); // Add the amount as well // Submit reservation using AJAX // Run check when form fields change