payment_information.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <!doctype html lang="<?php _trans('cldr'); ?>">
  2. <!--[if lt IE 7]>
  3. <html class="no-js ie6 oldie" lang="<?php _trans('cldr'); ?>"> <![endif]-->
  4. <!--[if IE 7]>
  5. <html class="no-js ie7 oldie" lang="<?php _trans('cldr'); ?>"> <![endif]-->
  6. <!--[if IE 8]>
  7. <html class="no-js ie8 oldie" lang="<?php _trans('cldr'); ?>"> <![endif]-->
  8. <!--[if gt IE 8]><!-->
  9. <html class="no-js" lang="<?php _trans('cldr'); ?>"> <!--<![endif]-->
  10. <head>
  11. <title>
  12. <?php
  13. if (get_setting('custom_title') != '') {
  14. echo get_setting('custom_title', '', true);
  15. } else {
  16. echo 'InvoicePlane';
  17. } ?>
  18. </title>
  19. <meta charset="utf-8">
  20. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  21. <meta name="viewport" content="width=device-width,initial-scale=1">
  22. <meta name="robots" content="NOINDEX,NOFOLLOW">
  23. <meta name="_csrf" content="<?php echo $this->security->get_csrf_hash() ?>">
  24. <link rel="icon" type="image/png" href="<?php echo base_url(); ?>assets/core/img/favicon.png">
  25. <link rel="stylesheet"
  26. href="<?php echo base_url(); ?>assets/<?php echo get_setting('system_theme', 'invoiceplane'); ?>/css/style.css">
  27. <link rel="stylesheet" href="<?php echo base_url(); ?>assets/core/css/custom.css">
  28. <?php if (get_setting('monospace_amounts') == 1) { ?>
  29. <link rel="stylesheet"
  30. href="<?php echo base_url(); ?>assets/<?php echo get_setting('system_theme', 'invoiceplane'); ?>/css/monospace.css">
  31. <?php } ?>
  32. <!--[if lt IE 9]>
  33. <script src="<?php echo base_url(); ?>assets/core/js/legacy.min.js"></script>
  34. <![endif]-->
  35. <script src="<?php echo base_url(); ?>assets/core/js/dependencies.min.js"></script>
  36. <script>
  37. $('.simple-select').select2();
  38. </script>
  39. </head>
  40. <body>
  41. <nav class="navbar navbar-default ">
  42. <div class="container">
  43. <div class="navbar-brand">
  44. <?php _trans('online_payment_for_invoice'); ?> #<?php echo $invoice->invoice_number; ?>
  45. </div>
  46. <ul class="nav navbar-nav navbar-right">
  47. <li>
  48. <a href="<?php echo site_url('guest/invoices/generate_pdf/'); ?>">
  49. <i class="fa fa-print"></i> <?php _trans('download_pdf'); ?>
  50. </a>
  51. </li>
  52. </ul>
  53. </div>
  54. </nav>
  55. <div class="container">
  56. <div class="row">
  57. <div class="col-xs-12 col-md-8 col-md-offset-2">
  58. <br>
  59. <?php
  60. $logo = invoice_logo();
  61. if ($logo) {
  62. echo $logo . '<br><br>';
  63. }
  64. ?>
  65. <?php echo $this->layout->load_view('layout/alerts'); ?>
  66. <div class="panel panel-default">
  67. <div class="panel-body">
  68. <div class="row">
  69. <div class="col-xs-12 col-md-7">
  70. <h4>
  71. <?php _htmlsc(format_client($invoice)) ?>
  72. </h4>
  73. <div class="client-address">
  74. <?php $this->layout->load_view('clients/partial_client_address', array('client' => $invoice)); ?>
  75. </div>
  76. </div>
  77. <div class="col-xs-12 col-md-5">
  78. <div class="hidden-md hidden-lg"><br></div>
  79. <div class="table-responsive">
  80. <table class="table table-bordered table-condensed no-margin">
  81. <tbody>
  82. <tr>
  83. <td><?php echo trans('invoice_date'); ?></td>
  84. <td style="text-align:right;"><?php echo date_from_mysql($invoice->invoice_date_created); ?></td>
  85. </tr>
  86. <tr class="<?php echo($is_overdue ? 'overdue' : '') ?>">
  87. <td><?php echo trans('due_date'); ?></td>
  88. <td class="text-right">
  89. <?php echo date_from_mysql($invoice->invoice_date_due); ?>
  90. </td>
  91. </tr>
  92. <tr class="<?php echo($is_overdue ? 'overdue' : '') ?>">
  93. <td><?php echo trans('total'); ?></td>
  94. <td style="text-align:right;"><?php echo format_currency($invoice->invoice_total); ?></td>
  95. </tr>
  96. <tr class="<?php echo($is_overdue ? 'overdue' : '') ?>">
  97. <td><?php echo trans('balance'); ?></td>
  98. <td style="text-align:right;"><?php echo format_currency($invoice->invoice_balance); ?></td>
  99. </tr>
  100. <?php if ($payment_method): ?>
  101. <tr>
  102. <td><?php echo trans('payment_method') . ': '; ?></td>
  103. <td><?php _htmlsc($payment_method->payment_method_name); ?></td>
  104. </tr>
  105. <?php endif; ?>
  106. </tbody>
  107. </table>
  108. </div>
  109. </div>
  110. <?php if (!empty($invoice->invoice_terms)) : ?>
  111. <div class="col-xs-12 text-muted">
  112. <br>
  113. <h4><?php echo trans('terms'); ?></h4>
  114. <div><?php echo nl2br(htmlsc($invoice->invoice_terms)); ?></div>
  115. </div>
  116. <?php endif; ?>
  117. </div>
  118. </div>
  119. </div>
  120. <?php if ($disable_form === false) { ?>
  121. <br>
  122. <form action="<?php echo site_url('guest/payment_handler/make_payment/'); ?>"
  123. method="post" id="payment-information-form">
  124. <input type="hidden" name="_ip_csrf" value="<?= $this->security->get_csrf_hash() ?>">
  125. <div class="form-group">
  126. <input type="hidden" name="invoice_url_key"
  127. value="<?php echo $invoice->invoice_url_key; ?>">
  128. <label for="gateway-select"><?php _trans('online_payment_method'); ?></label>
  129. <select name="gateway" id="gateway-select" class="form-control simple-select">
  130. <?php
  131. // Display all available gateways
  132. foreach ($gateways as $gateway) { ?>
  133. <option value="<?php echo $gateway; ?>">
  134. <?php echo ucwords(str_replace('_', ' ', $gateway)); ?>
  135. </option>
  136. <?php } ?>
  137. </select>
  138. </div>
  139. <div class="panel panel-default">
  140. <div class="panel-heading">
  141. <?php _trans('creditcard_details'); ?>
  142. </div>
  143. <div class="panel-body">
  144. <div class="form-group">
  145. <div class="alert alert-info no-margin">
  146. <?php _trans('online_payment_creditcard_hint'); ?>
  147. </div>
  148. </div>
  149. <div class="form-group">
  150. <label class="control-label">
  151. <?php _trans('creditcard_number'); ?>
  152. </label>
  153. <input type="text" name="creditcard_number" class="input-sm form-control">
  154. </div>
  155. <div class="row">
  156. <div class="col-xs-4">
  157. <div class="form-group">
  158. <label class="control-label">
  159. <?php _trans('creditcard_expiry_month'); ?>
  160. </label>
  161. <input type="number" name="creditcard_expiry_month"
  162. class="input-sm form-control"
  163. min="1" max="12">
  164. </div>
  165. </div>
  166. <div class="col-xs-4">
  167. <div class="form-group">
  168. <label class="control-label">
  169. <?php _trans('creditcard_expiry_year'); ?>
  170. </label>
  171. <input type="number" name="creditcard_expiry_year"
  172. class="input-sm form-control"
  173. min="<?php echo date('Y'); ?>" max="<?php echo date('Y') + 20; ?>">
  174. </div>
  175. </div>
  176. <div class="col-xs-4">
  177. <div class="form-group">
  178. <label class="control-label">
  179. <?php _trans('creditcard_cvv'); ?>
  180. </label>
  181. <input type="number" name="creditcard_cvv" class="input-sm form-control">
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="form-group">
  188. <button class="btn btn-success btn-lg ajax-loader" type="submit">
  189. <i class="fa fa-credit-card fa-margin"></i>
  190. <?php echo trans('pay_now') . ': ' . format_currency($invoice->invoice_balance); ?>
  191. </button>
  192. </div>
  193. </form>
  194. <?php } ?>
  195. </div>
  196. </div>
  197. </div>
  198. <div id="modal-placeholder"></div>
  199. <?php echo $this->layout->load_view('layout/includes/fullpage-loader'); ?>
  200. <script defer src="<?php echo base_url(); ?>assets/core/js/scripts.min.js"></script>
  201. <?php if (trans('cldr') != 'en') { ?>
  202. <script src="<?php echo base_url(); ?>assets/core/js/locales/bootstrap-datepicker.<?php _trans('cldr'); ?>.js"></script>
  203. <?php } ?>
  204. </body>
  205. </html>