Created
May 14, 2023 08:38
-
-
Save MarketingIQ/1dd16d01596819924f6966f0ec899065 to your computer and use it in GitHub Desktop.
Squad Payment Gateway
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<HEAD> | |
<TITLE>SQUAD</TITLE> | |
</HEAD> | |
<BODY> | |
<form id="paymentForm"> | |
<div class="container"> | |
<div class="text-left" style="color:red; font-family: Verdana; font-size: 30px;">SAMPLE CHECKOUT</div> | |
<h6>Note: Amount should be between $1 to $10,000 (USD), NGN100 to NGN5,000,000 and KSH100 to KSH5,000,000</h6> | |
<div class="row"> | |
<div class="col-lg-4"> | |
<div class="form-group"> | |
<label for="email">Email Address</label> | |
<input type="email" id="email-address" class="form-control" required /><br> | |
</div> | |
</div> | |
<div class="col-lg-4"> | |
<div class="form-group"> | |
<label for="amount">Amount</label> | |
<input type="tel" id="amount" class="form-control" required /><br> | |
</div> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-lg-4"> | |
<div class="form-group"> | |
<label for="first-name">First Name</label> | |
<input type="text" id="first-name" class="form-control" /><br> | |
</div> | |
</div> | |
<div class="col-lg-4 col-lg-offset-2"> | |
<div class="form-group"> | |
<label for="last-name">Last Name</label> | |
<input type="text" id="last-name" class="form-control" /><br> | |
</div> | |
</div> | |
</div> | |
<div class="col-lg-4"> | |
<div class="form-submit"> | |
<button type="button" onclick="SquadPay()" class="btn btn-danger">Check Out</button><br><br> | |
</div> | |
</div> | |
</div> | |
</form> | |
</BODY> | |
<HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SquadPay() { | |
const squadInstance = new squad({ | |
onClose: () => console.log("Widget closed"), | |
onLoad: () => console.log("Widget loaded successfully"), | |
onSuccess: () => console.log(`Linked successfully`), | |
key: "sandbox_pk_7e75ad7aa1ecce1f589361edbf2bc850", | |
//Change key (test_pk_sample-public-key-1) to the key on your Squad Dashboard | |
email: document.getElementById("email-address").value, | |
amount: document.getElementById("amount").value * 100, | |
//Enter amount in Naira or Dollar (Base value Kobo/cent already multiplied by 100) | |
currency_code: "NGN" | |
}); | |
squadInstance.setup(); | |
squadInstance.open(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://test-checkout.squadinc.co/widget/squad.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.2/css/bootstrap.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment