Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Payload Billing Details Form
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style>
.form-control.pl-input.pl-focus {
color: #495057;
background-color: #fff;
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
outline:none;
}
.form-control.pl-input.pl-focus.is-invalid {
border-color: #dc3545;
box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25);
}
</style>
</head>
<body>
<div class="container">
<main role="main" class="mt-4">
<div class="jumbotron">
<div class="col-sm-8 mx-auto">
<h1 class="text-center">Save Billing Details</h1>
</div>
</div>
<div class="alert alert-danger" role="alert">
Set the client key in the code to get started
</div>
<form id="payment-method-form" class="my-2 container w-50 px-5" pl-form="payment_method">
<!-- <input type="hidden" pl-input="customer_id" value="UPDATE ME"> -->
<div class="row pt-2">
<div class="form-group col-6 px-1">
<label>Account Number</label>
<div class="form-control" pl-input="account_number"></div>
</div>
<div class="form-group col-6 px-1">
<label>Routing Number</label>
<div class="form-control" pl-input="routing_number"></div>
</div>
</div>
<div class="row pt-2">
<div class="form-group col-7 px-1">
<label>Account Holder Name</label>
<input class="form-control w-100" pl-input="account_holder" type="text" placeholder="First Last" />
</div>
<div class="form-group col-5 px-1">
<label>Account Type</label>
<select class="form-control" pl-input="account_type">
<option value="checking">Checking</option>
<option value="savings">Savings</option>
</select>
</div>
</div>
<div class="row pt-2">
<button class="btn btn-primary" type="submit">Save Billing Details</button>
</div>
</form>
</main>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://payload.co/Payload.js"></script>
<script>
var pl = Payload('UPDATE WITH YOUR test_client_key_....')
var pm_form = new pl.Form({
form:$('#payment-method-form').get(0),
styles:{invalid:'is-invalid'}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.