{% extends 'TopxiaAdminBundle:System:payment-set.layout.html.twig' %}

{% block title %}支付方式 - {{ parent() }}{% endblock %}

{% set script_controller = 'system/payment' %}

{% set submenu = 'payment' %}

{% block maincontent %}

<div class="page-header"><h1>支付方式</h1></div>

{{ web_macro.flash_messages() }}

<form class="form-horizontal" method="post" id="payment-form" novalidate >
  
  <div class="form-group">
    <div class="col-md-3 control-label">
      <label >支付功能</label>
    </div>
    <div class="controls col-md-8 radios">
      {{ radios('enabled', {1:'开启', 0:'关闭'}, payment.enabled) }}
    </div>
  </div>

    <div class="form-group">
      <div class="col-md-3 control-label">
        <label for="disabled_message">支付关闭时的提示信息</label>
      </div>
      <div class="controls col-md-8">
        <textarea id="disabled_message" name="disabled_message" class="form-control">{{payment.disabled_message}}</textarea>
        <div class="help-block">提示信息支持HTML标签。</div>
      </div>
    </div>


  <fieldset>
    <legend>支付宝</legend>
    <div class="form-group">
      <div class="col-md-3 control-label">
        <label>接口状态</label>
      </div>
      <div class="controls col-md-8 radios">
        {{ radios('alipay_enabled', {1:'开启', 0:'关闭'}, payment.alipay_enabled) }}
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-3 control-label">
        <label for="alipay_key">接口类型</label>
      </div>
      <div class="controls col-md-8 radios">
        {{ radios('alipay_type', {'direct':'立即到账接口', 'dualfun':'标准双接口' }, payment.alipay_type)}}
        <div class="help-block">
          由于支付宝政策限制，"立即到账接口"只能以企业的名义申请，个人用户请申请“标准双接口”。
          <a href="http://www.edusoho.com/intro/96#payment" target="_blank">如何申请？</a>
          <br>
          "立即到账接口"如需在移动客户端使用，还需开通<a href="https://b.alipay.com/order/productDetail.htm?productId=2013080604609688" target="blank">手机网站支付</a>


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

    <div class="form-group">
      <div class="col-md-3 control-label">
        <label for="alipay_key">PID</label>
      </div>
      <div class="controls col-md-8">
        <input type="text" id="alipay_key" name="alipay_key" class="form-control" value="{{payment.alipay_key}}">
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-3 control-label">
        <label for="alipay_key">Key</label>
      </div>
      <div class="controls col-md-8">
        <input type="text" id="alipay_secret" name="alipay_secret" class="form-control" value="{{payment.alipay_secret}}">
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-3 control-label">
        <label for="alipay_key">支付宝账户</label>
      </div>
      <div class="controls col-md-8">
        <input type="text" id="alipay_account" name="alipay_account" class="form-control" value="{{payment.alipay_account}}">
        <div class="help-block">如需开启移动客户端支付，需填写支付宝账户。</div>
      </div>
    </div>

  </fieldset>

  <div class="form-group">
    <div class="col-md-3 control-label"></div>
    <div class="controls col-md-8">
      <button type="submit" class="btn btn-primary">提交</button>
    </div>
  </div>


  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
</form>

{% endblock %}