invoice-payment.tpl 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {if $showRemoteInput}
  2. <div id="frmRemoteCardProcess" class="text-center">
  3. {$remoteInput}
  4. <iframe name="ccframe" class="auth3d-area" width="90%" height="600" scrolling="auto" src="about:blank"></iframe>
  5. </div>
  6. <script>
  7. jQuery("#frmRemoteCardProcess").find("form:first").attr('target', 'ccframe');
  8. setTimeout("autoSubmitFormByContainer('frmRemoteCardProcess')", 1000);
  9. </script>
  10. {else}
  11. {include file="$template/payment/$cardOrBank/validate.tpl"}
  12. <form id="frmPayment" method="post" action="{$submitLocation}" role="form">
  13. <input type="hidden" name="invoiceid" value="{$invoiceid}" />
  14. <div class="row">
  15. <div class="col-md-7 col-lg-8">
  16. {if $errormessage}
  17. {include file="$template/includes/alert.tpl" type="error" errorshtml=$errormessage}
  18. {/if}
  19. <div class="alert alert-danger text-center gateway-errors w-hidden"></div>
  20. <div class="card">
  21. <div class="card-header bg-white">
  22. <h4 class="my-0">{lang key="makepayment"}</h4>
  23. </div>
  24. <div class="card-body">
  25. <div id="paymentGatewayInput">
  26. <div class="cc-payment-form">
  27. <div class="form-group row">
  28. <label class="col-sm-12 text-md-right control-label">
  29. {lang key='paymentmethod'}
  30. </label>
  31. <div class="col-sm-12">
  32. {include file="$template/payment/$cardOrBank/select.tpl"}
  33. </div>
  34. </div>
  35. {if !$hasRemoteInput}
  36. {include file="$template/payment/$cardOrBank/inputs.tpl"}
  37. {/if}
  38. </div>
  39. </div>
  40. <div id="btnSubmitContainer" class="form-group submit-container mb-0">
  41. <div class="form-actions mb-0 pb-0">
  42. <button type="submit" class="btn btn-primary btn-block" id="btnSubmit" value="{lang key='submitpayment'}">
  43. <span class="pay-text">{lang key='submitpayment'}</span>
  44. <span class="click-text w-hidden">{lang key='pleasewait'}</span>
  45. </button>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. {if $servedOverSsl}
  51. <div class="alert alert-warning small" role="alert">
  52. <i class="fas fa-lock"></i> &nbsp; {lang key='creditcardsecuritynotice'}
  53. </div>
  54. {/if}
  55. </div>
  56. <div class="col-md-5 col-lg-4">
  57. {include file="$template/payment/invoice-summary.tpl"}
  58. </div>
  59. </div>
  60. </form>
  61. <script>
  62. jQuery(document).ready(function() {
  63. jQuery('#inputCardCvv, #inputCardNumber').filter(':visible').first().focus();
  64. WHMCS.payment.event.gatewayInit({
  65. _source: 'invoice-pay',
  66. }, '{$gateway|addslashes}');
  67. jQuery('#frmPayment').on('submit.paymentjs', function(e) {
  68. WHMCS.payment.event.checkoutFormSubmit(
  69. {
  70. _source: 'invoice-pay',
  71. event: e,
  72. },
  73. '{$gateway|addslashes}',
  74. jQuery(this)
  75. );
  76. });
  77. jQuery('.existing-card, .existing-account').change('ifChecked', function (event) {
  78. $(this).closest(".card-item").toggleClass('selected', this.checked);
  79. });
  80. });
  81. </script>
  82. {/if}