Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (42 sloc) 1.53 KB
<!--Example checkout form with client-side encryption. For help, see>
<!DOCTYPE html>
<meta charset="UTF-8">
<!--Insert the relevant URL for the form action-->
<form action="your-form-handling-page" method="POST" id="checkout-form">
<label for="FirstName">Name on Card</label>
<input type="text" name="cardholder-name" id="cardholder-name">
<!--Note the data-bluesnap attribute-->
<label for="creditCard">Card Number</label>
<input type="text" name="creditCard" id="creditCard" data-bluesnap="encryptedCreditCard">
<!--Note the data-bluesnap attribute-->
<label for="cvv">Security Code</label>
<input type="text" name="cvv" id="cvv" data-bluesnap="encryptedCvv">
<label for="Expiration">Exp. (MM/YYYY)</label>
<input type="text" name="exp-month" id="exp-month" size="2">
<span> / </span>
<input type="text" name="exp-year" id="exp-year" size="4">
<button type="submit" id="submit-button">Buy Now</button>
<!--Adds the BlueSnap JavaScript library-->
<script src=""></script>
<!--Creates the BlueSnap object, instantiates it with your public key, and enables encryption on submit-->
var bluesnap = new BlueSnap("YOUR_PUBLIC_CSE_KEY");
document.getElementById("submit-button").addEventListener("click", function(){