inital commit
This commit is contained in:
66
webroot/js/payment.js
Normal file
66
webroot/js/payment.js
Normal file
@@ -0,0 +1,66 @@
|
||||
function setAuthorizedApiLoginId(){
|
||||
var html = `<div class="form-group row authorize-dot-net">
|
||||
<label class="control-label col-lg-3 required">Api Login Id</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input text required">
|
||||
<input type="text" name="authorized[api_login_id]" class="form-control" required="required" placeholder="e.g, 46Z6ntFd" id="authorized-api-login-id">
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
function setAuthorizedTransactionKey(){
|
||||
var html = `<div class="form-group row authorize-dot-net" style="margin-bottom:0">
|
||||
<label class="control-label col-lg-3 required">Api Transaction Key</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input text required">
|
||||
<input type="text" name="authorized[transaction_key]" class="form-control" required="required" placeholder="e.g, 3648CBa6P43gYKjD" id="authorized-transaction-key">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row authorize-dot-net">
|
||||
<label class="control-label col-lg-3"></label>
|
||||
<div class="col-lg-9">
|
||||
<a target="_blank" href="${AUTHORIZE_DOT_NET_SIGN_UP_URL}">Click here</a> to set up your Authorize.net account now.
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
function setAuthorizedNmiKey(){
|
||||
var html = `<div class="form-group row nmi-class" style="margin-bottom:0">
|
||||
<label class="control-label col-lg-3 required">Api Key</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input text required">
|
||||
<input type="text" name="nmi[nmi_key]" class="form-control" required="required" placeholder="e.g, 3648CBa6P43gYKjD" id="nmi-nmi-key">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row nmi-class">
|
||||
<label class="control-label col-lg-3"></label>
|
||||
<div class="col-lg-9">
|
||||
<a target="_blank" href="${NMI_DOT_COM_SIGN_UP_URL}">Click here</a> to set up your nmi.com account now.
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
|
||||
function changeExportType(elem) {
|
||||
|
||||
var exportVal = Number($(elem).val());
|
||||
$('.authorize-dot-net,.nmi-class').remove();
|
||||
|
||||
switch (exportVal) {
|
||||
case 1:
|
||||
$('#name-id').after(setAuthorizedApiLoginId()+setAuthorizedTransactionKey())
|
||||
break;
|
||||
case 2:
|
||||
$('#name-id').after(setAuthorizedNmiKey())
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user