Skip to content

Instantly share code, notes, and snippets.

@piyushgarg-dev
Created May 9, 2021 06:53
Show Gist options
  • Save piyushgarg-dev/7ee6d5d32330921126b38dae107c3ee4 to your computer and use it in GitHub Desktop.
Save piyushgarg-dev/7ee6d5d32330921126b38dae107c3ee4 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Razorpay</title>
</head>
<body>
<div>
<button id="buy-now-btn">Buy Now</button>
</div>
<!-- Razorpay Script -->
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
// Get the button
const buyButton = document.getElementById('buy-now-btn');
// Add click event listner
buyButton.addEventListener('click', (event) => {
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment