@extends('admin.master')

@section('top')
  <div class="top-breadcrumb pull-left">
    <h5>支付设置</h5>
  </div>
@endsection

@section('ordersearch')
<div class="nav-tabs-box">
  <ul class="nav nav-tabs margin-top-15" role="tablist">
    <li role="presentation" class="active"><a href="#tab-1" aria-controls="tab-1" role="tab" data-toggle="tab">支付宝支付设置</a></li>
    <li role="presentation"><a href="#tab-2" aria-controls="tab-2" role="tab" data-toggle="tab">微信支付设置</a></li>
    <li role="presentation"><a href="#tab-3" aria-controls="tab-3" role="tab" data-toggle="tab">PayPal支付设置</a></li>
  </ul>
</div>
    
@endsection

@section('content')

  {!! Form::model($setting, ['route' => ['admin.setting.update'], 'method'=>'post', 'class'=>'form-horizontal form-detail']) !!}
  <div class="tab-content">
    <input type="hidden" name="action" value="payment">
    <div role="tabpanel" class="tab-pane active" id="tab-1">
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">支付宝APPID：</label>
        <div class="col-sm-5">
          {!! Form::text('ali_app_id', null, ['class'=>'form-control']) !!}
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">RSA2 私钥：</label>
        <div class="col-sm-5">
          {!! Form::textarea("ali_private_key", null, ['class'=>'form-control', 'rows'=>5]) !!}
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">支付宝公钥：</label>
        <div class="col-sm-5">
          {!! Form::textarea("ali_public_key", null, ['class'=>'form-control', 'rows'=>5]) !!}
        </div>
      </div>
    </div>
    <div role="tabpanel" class="tab-pane" id="tab-2">
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">绑定支付APPID：</label>
        <div class="col-sm-5">
          {!! Form::text('wechat_app_id', null, ['class'=>'form-control']) !!}
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">微信商户号：</label>
        <div class="col-sm-5">
          {!! Form::text('wechat_mch_id', null, ['class'=>'form-control']) !!}
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">商户支付密钥：</label>
        <div class="col-sm-5">
          {!! Form::text('wechat_key', null, ['class'=>'form-control']) !!}
        </div>
      </div>
    </div>
    <div role="tabpanel" class="tab-pane" id="tab-3">
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">Client ID：</label>
        <div class="col-sm-5">
          {!! Form::text('paypal_client_id', null, ['class'=>'form-control']) !!}
        </div>
        <div class="col-sm-2 form-tag-add">
          <a href="https://developer.paypal.com/developer/" class="pt-5" target="_blank">如何获取</a>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">Secret：</label>
        <div class="col-sm-5">
          {!! Form::text('paypal_secret', null, ['class'=>'form-control']) !!}
        </div>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label label-width"></label>
      <div class="col-sm-5">
        {!! Form::submit('提交', ['class'=>'btn btn-primary']) !!}
      </div>
    </div>
  </div>
  {!! Form::close() !!}
@endsection