Only load Stripe.js once
This commit is contained in:
parent
d6130fa381
commit
9f50068157
@ -7,6 +7,7 @@
|
||||
var signaturePad = null;
|
||||
var frontSlipImg = null;
|
||||
var backSlipImg = null;
|
||||
var stripeLoaded = false;
|
||||
|
||||
function initSignaturePad() {
|
||||
var canvas = document.getElementById("signaturecanvas");
|
||||
@ -35,7 +36,11 @@ function initNoticeSlipForm() {
|
||||
initSignaturePad();
|
||||
$("#noticeform #name").attr("placeholder", ["John Doe", "Jane Doe", "Dave S. Nothereman", "Sara N. Ignatur"].random());
|
||||
$("#noticeform #zip").attr("placeholder", ["59601", "59602"].random());
|
||||
$.getScript("https://js.stripe.com/v3");
|
||||
if (!stripeLoaded) {
|
||||
$.getScript("https://js.stripe.com/v3", function () {
|
||||
stripeLoaded = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function takeDocPhoto(side) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user