firstdata_order.twig (5129B)
1 <h2>{{ text_payment_info }}</h2> 2 {% if void_success %} 3 <div class="alert alert-success alert-dismissible">{{ void_success }}</div> 4 {% endif %} 5 {% if void_error %} 6 <div class="alert alert-warning alert-dismissible">{{ void_error }}</div> 7 {% endif %} 8 <table class="table table-striped table-bordered"> 9 <tr> 10 <td>{{ text_order_ref }}</td> 11 <td>{{ firstdata_order.order_ref }}</td> 12 </tr> 13 <tr> 14 <td>{{ text_order_total }}</td> 15 <td>{{ firstdata_order.total_formatted }}</td> 16 </tr> 17 <tr> 18 <td>{{ text_total_captured }}</td> 19 <td id="firstdata_total_captured">{{ firstdata_order.total_captured_formatted }}</td> 20 </tr> 21 <tr> 22 <td>{{ text_capture_status }}</td> 23 <td id="capture_status">{% if firstdata_order.capture_status == 1 %}<span class="capture_text">{{ text_yes }}</span> {% else %} <span class="capture_text">{{ text_no }}</span> 24 {% if firstdata_order.void_status == 0 %} <a class="button btn btn-primary" id="button_capture">{{ button_capture }}</a> <span class="btn btn-primary" id="img_loading_capture" style="display:none;"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i></span> {% endif %} 25 {% endif %}</td> 26 </tr> 27 <tr> 28 <td>{{ text_void_status }}</td> 29 <td id="void_status">{% if firstdata_order.void_status == 1 %} <span class="void_text">{{ text_yes }}</span> {% else %} <span class="void_text">{{ text_no }}</span> <a class="button btn btn-primary" id="button-void">{{ button_void }}</a> <span class="btn btn-primary" id="img_loading_void" style="display:none;"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i></span> {% endif %}</td> 30 </tr> 31 <tr> 32 <td>{{ text_transactions }}:</td> 33 <td><table class="table table-striped table-bordered" id="firstdata_transactions"> 34 <thead> 35 <tr> 36 <td class="text-left"><strong>{{ text_column_date_added }}</strong></td> 37 <td class="text-left"><strong>{{ text_column_type }}</strong></td> 38 <td class="text-left"><strong>{{ text_column_amount }}</strong></td> 39 </tr> 40 </thead> 41 <tbody> 42 43 {% for transaction in firstdata_order.transactions %} 44 <tr> 45 <td class="text-left">{{ transaction.date_added }}</td> 46 <td class="text-left">{{ transaction.type }}</td> 47 <td class="text-left">{{ transaction.amount }}</td> 48 </tr> 49 {% endfor %} 50 </tbody> 51 52 </table></td> 53 </tr> 54 </table> 55 <form method="POST" id="voidform" action="{{ action_url }}"> 56 <input type="hidden" name="responseSuccessURL" value="{{ void_url }}"/> 57 <input type="hidden" name="responseFailURL" value="{{ void_url }}"/> 58 <input type="hidden" name="transactionNotificationURL" value="{{ notify_url }}"/> 59 <input type="hidden" name="txntype" value="void"/> 60 <input type="hidden" name="timezone" value="GMT"/> 61 <input type="hidden" name="txndatetime" value="{{ request_timestamp }}"/> 62 <input type="hidden" name="hash" value="{{ hash }}"/> 63 <input type="hidden" name="storename" value="{{ merchant_id }}"/> 64 <input type="hidden" name="chargetotal" value="{{ amount }}"/> 65 <input type="hidden" name="currency" value="{{ currency }}"/> 66 <input type="hidden" name="oid" value="{{ firstdata_order.order_ref }}"/> 67 <input type="hidden" name="tdate" value="{{ firstdata_order.tdate }}"/> 68 <input type="hidden" name="order_id" value="{{ order_id }}"/> 69 </form> 70 <form method="POST" id="captureform" action="{{ action_url }}"> 71 <input type="hidden" name="responseSuccessURL" value="{{ capture_url }}"/> 72 <input type="hidden" name="responseFailURL" value="{{ capture_url }}"/> 73 <input type="hidden" name="transactionNotificationURL" value="{{ notify_url }}"/> 74 <input type="hidden" name="txntype" value="postauth"/> 75 <input type="hidden" name="timezone" value="GMT"/> 76 <input type="hidden" name="txndatetime" value="{{ request_timestamp }}"/> 77 <input type="hidden" name="hash" value="{{ hash }}"/> 78 <input type="hidden" name="storename" value="{{ merchant_id }}"/> 79 <input type="hidden" name="chargetotal" value="{{ amount }}"/> 80 <input type="hidden" name="currency" value="{{ currency }}"/> 81 <input type="hidden" name="oid" value="{{ firstdata_order.order_ref }}"/> 82 <input type="hidden" name="tdate" value="{{ firstdata_order.tdate }}"/> 83 <input type="hidden" name="order_id" value="{{ order_id }}"/> 84 </form> 85 <script type="text/javascript"><!-- 86 $("#button-void").bind('click', function () { 87 if (confirm('{{ text_confirm_void }}')) { 88 $('#voidform').submit(); 89 } 90 }); 91 92 $("#button_capture").bind('click', function () { 93 if (confirm('{{ text_confirm_capture }}')) { 94 $('#captureform').submit(); 95 } 96 }); 97 98 $(document).ready(function () { 99 {% if void_success %} 100 alert('{{ void_success }}'); 101 {% endif %} 102 103 {% if void_error %} 104 alert('{{ void_error }}'); 105 {% endif %} 106 107 {% if capture_success %} 108 alert('{{ capture_success }}'); 109 {% endif %} 110 111 {% if capture_error %} 112 alert('{{ capture_error }}'); 113 {% endif %} 114 }); 115 //--></script>