{% include 'header.twig' %}
<div class="inner-page">
  <section>
    <div class="container">
      <div class="row justify-content-center payments-card">
    

<div class="col-md-{% if bankPayment == 2 %}12{% else %}10 col-md-offset-1{% endif%}">
        {% if error %}
          <div class="alert alert-dismissible alert-danger">
            <button type="button" class="close" data-dismiss="alert">×</button>
            {{ errorText }}
          </div>
        {% endif %}
        {% if success %}
          <div class="alert alert-dismissible alert-success">
            <button type="button" class="close" data-dismiss="alert">×</button>
            {{ successText }}
          </div>
        {% endif %}
      </div>

      <div class="col-md-6 col-md-offset-1">
        {% if paymentsList %}
         <div class="card">
             <div class="card-body">
           <center> <h1>
              {{ lang['addfunds.online.title'] }}              
            </h1></center><br>
            <div class="panel-body">
              <form method="post" action="addfunds">

                <div class="form-group">
                  <label for="method" class="control-label">{{ lang['addfunds.method'] }}</label>
                  <select class="form-control" id="payment_method" name="payment_type">
                   {% for payment in paymentsList %}
                      <option value="{{ payment['id'] }}" {% if data['payment_type'] == payment['id'] %} selected {% endif %} >{{ payment['method_name'] }}</option>
                    {% endfor %}
                  </select>
                </div>

                  <div class="form-group">
                      <label for="method" class="control-label">{{ lang['addfunds.amount'] }}</label>
                      <input class="form-control" name="payment_amount" value="{{ data['payment_amount'] }}">
                  </div>

                <button type="submit" class="btn btn-primary">{{ lang['addfunds.button'] }}</button>
              </form>
            </div>
          </div>      </div>
        {% endif %}
      </div>
      
      <br>

    {% if PaytmQR == 2 %}
        <div class="col-md-6">
           <div class="card">
            <div class="card-body">
             <h1><center>
                PaytmQR
    			 </h1></center>
              <div class="panel-body">
                <form method="post" action="addfunds">
                    <center><img width="50%" src="{{ PaytmQRimage }}"></center>
                    <div class="form-group col-md-12">
                        <label for="method" class="control-label">Amount</label>
                        <input class="form-control" name="payment_amount" value="{{ data['payment_amount'] }}">
                    </div>
                    <div class="form-group col-md-12">
                        <label for="method" class="control-label">Order ID</label>
                        <p>Enter Transaction/Order ID without spaces. Example - 202010122210100058</p>
                        <input class="form-control" name="paytmqr_orderid" value="{{ data['paytmqr_orderid'] }}">
                    </div>
                    <input type="hidden" class="form-control" name="payment_type" value="14">
                    <div class="col-md-12">
                      <button type="submit" class="btn btn-primary">Submit</button>
                    </div>
                </form>
              </div>
            </div>  
          </div>
        </div>
      {% endif %}

      {#{% if bankPayment == 2 %}#}
      {#  <div class="col-md-6">#}
      {#    {% if paymentsList %}#}
      {#     <div class="card">#}
      {#         <div class="card-body">#}
      {#       <h1><center>#}
      {#          {{ lang['addfunds.bank.title'] }}#}
    		{#	 </h1></center><br>#}
      {#        <div class="panel-body">#}
      {#          <form method="post" action="addfunds">#}

      {#            <div class="form-group col-md-12">#}
      {#              <label for="method" class="control-label">{{ lang['addfunds.bank'] }}</label>#}
      {#              <select class="form-control" name="payment_bank">#}
      {#               {% for bank in bankList %}#}
      {#                  <option value="{{ bank['id'] }}" {% if data['payment_bank'] == payment['id'] %} selected {% endif %} >{{ bank['bank_name'] }}</option>#}
      {#                {% endfor %}#}
      {#              </select>#}
      {#            </div>#}

      {#              <div class="form-group col-md-6">#}
      {#                  <label for="method" class="control-label">{{ lang['addfunds.bank.amount'] }}</label>#}
      {#                  <input class="form-control" name="payment_bank_amount" value="{{ data['payment_bank_amount'] }}">#}
      {#              </div>#}
      {#              <div class="form-group col-md-6">#}
      {#                  <label for="method" class="control-label">{{ lang['addfunds.bank.sender'] }}</label>#}
      {#                  <input class="form-control" name="payment_gonderen" value="{{ data['payment_gonderen'] }}">#}
      {#              </div>#}
      {#              <div class="col-md-12">#}
      {#                <button type="submit" class="btn btn-primary">{{ lang['addfunds.bank.button'] }}</button>#}
      {#              </div>#}
      {#          </form>#}
      {#        </div>#}
      {#      </div>      </div>#}
      {#    {% endif %}#}
      {#  </div>#}
      {#{% endif %}#}

          
<br>

  {% if bankPayment == 2 %}
<br>
          <div class="col-md-{% if bankPayment == 2 %}12{% else %}10 col-md-offset-1{% endif%} ">
 <div class="card">
                    <div class="card-body">
          <form method="post" action="kupon">
            <div class="form-group">
              <label for="subject" class="control-label">Coupon Code</label>
              <input type="text" class="form-control" id="kuponadi" name="kuponadi">
            </div>
            <button type="submit" class="btn btn-primary">Use</button>
          </form>
        </div>
      
      </div>
      <br>

      
      <div class="">
      <div class="card">
        <div class="card-body">
          
          <div class="tab-content">
              <div class="table-responsive">
            <table class="table table-striped ">
              <thead>
            <tr>
              <th>#</th>
              <th>Amount</th>
              <th class="width-40">Method</th>
              <th>Date</th>
              <th class="nowrap">Transaction ID</th>
            </tr>
          </thead>
          <tbody>

            {% for transaction in transactions %}
              <tr>
                <td>{{ transaction['payment_id'] }}</td>
                <td>{{ transaction['payment_amount'] }}</td>
                <td class="width-40">{{ transaction['method_name'] }}</td>
                <td>{{ transaction['payment_create_date'] }}</td>
                <td class="nowrap">{{ transaction['payment_extra'] }}</td>
                
              </tr>
            {% endfor %}

          </tbody>
        </table>
      </div>

    </div>
  </div>
</div>

</div>

<br>


                  <div class="card">
                              <div class="card-body">

              <p style="text-align: center;">
                <span style="font-weight: 700; font-size: 36px;">Bank</span><span style="font-size: 36px;"> Account</span>
              </p>

              <div class="table-responsive">
                <table class="table table-striped table-bordered table-checkable ">
                  <thead>
                    <tr>
                      <th>Bank Name</th>
                      <th>Branch code</th>
                      <th>Account number</th>
                      <th>IBAN</th>
                      <th>Recipient Name</th>

                    </tr>
                  </thead>
                  <tbody>
                  {% for bank in bankList %}
                    <tr>
                      <td>{{ bank['bank_name'] }}</td>
                      <td>{{ bank['bank_sube'] }}</td>
                      <td>{{ bank['bank_hesap'] }}</td>
                      <td><b>{{ bank['bank_iban'] }}</b><br></td>
                      <td>{{ bank["bank_alici"] }}</td>
                    </tr>
                  {% endfor %}
                    </tbody>
                  </table>
                </div>

              <div class="table-responsive">
                <table class="table table-striped table-bordered table-checkable ">
                  <tbody>
                    <tr>
                      <td>
                        <b>INFORMATION: </b> Transfer / EFT fees deducted while making payment will not be covered by us.
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>

            </div>


        </div>
      </div>
    </div>
  {% endif %}
</section>


{% include 'footer.twig' %}
