Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html #203

Open
Yusuftanja opened this issue Jan 2, 2023 · 4 comments
Open

Html #203

Yusuftanja opened this issue Jan 2, 2023 · 4 comments

Comments

@Yusuftanja
Copy link

HTML

@Lukziz
Copy link

Lukziz commented Dec 6, 2023

<title>Member Payment</title>

Enter Unique Code

Unique Code: Submit
<div id="paymentForm" style="display: none;">
    <h1>Payment</h1>
    <!-- Add your payment form fields here -->
    <button type="submit" id="submitPayment">Submit Payment</button>
</div>

<script>
    const otpForm = document.getElementById('otpForm');
    const paymentForm = document.getElementById('paymentForm');

    otpForm.addEventListener('submit', (event) => {
        event.preventDefault();
        const otp = document.getElementById('otp').value;

        // Verify the OTP with your server
        fetch('/verify_otp', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify({ otp: otp })
        })
        .then((response) => {
            if (response.ok) {
                paymentForm.style.display = 'block';
            } else {
                alert('Invalid OTP. Please try again.');
            }
        })
        .catch((error) => {
            console.error('Error:', error);
        });
    });

    const submitPayment = document.getElementById('submitPayment');
    submitPayment.addEventListener('click', (event) => {
        // Process the payment
        // You can add your own payment processing logic here
    });
</script>
``` ```

@Jamilu20
Copy link

Jamilu20 commented Dec 6, 2023 via email

@Jamilu20
Copy link

Jamilu20 commented Dec 6, 2023 via email

@Musakl
Copy link

Musakl commented Feb 16, 2024

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants