<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->
<!--{if $a == "run"}-->
<div class="oemarry_layout">
  <div class="oe_top_nav"><i></i>接口设置->支付接口</div>
  <div class="oe_content">
	
	<form id="serform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
	<div class="oe_txtwrap">
	  标题：<input type="text" name="stitle" id="stitle" class="input-150" value="<!--{$stitle}-->" />&nbsp;
	  接口名：<input type="text" name="ssdkname" id="ssdkname" class="input-150" value="<!--{$ssdkname}-->" />&nbsp;
	  &nbsp;&nbsp;<input type="submit" name="btn_search" id="btn_search" class="button_2" value="搜索" />
	</div>
	</form>
    
    <table class="oe_table_list table_cs">
	  <tr>
	    <th width="8%">ID</th>
		<th width="20%">图标</th>
		<th width="15%">标题</th>
		<th width="12%">接口</th>
		<th width="8%">适用于</th>
		<th width="15%">商户ID</th>
		<th width="7%">状态</th>
		<th width="7%">排序</th>
		<th>操作</th>
	  </tr>
	  <!--{if empty($paysdk)}-->
	  <tr>
	    <td class="text_center" colspan="9">No data!</td>
	  </tr>
	  <!--{else}-->
	  <!--{foreach $paysdk as $volist}-->
	  <tr>
	    <td class="text_center"><!--{$volist.sdkid}--></td>
		<td><img src="<!--{$urlpath}--><!--{$volist.logo}-->" /></td>
		<td><!--{$volist.title}--></td>
		<td><!--{$volist.sdkname}--></td>
		<td class="text_center">
		<!--{if $volist.type == 'pc'}-->
		<font color="blue">电脑<font>
		<!--{else}-->
		<font color="orange">手机WAP</font>
		<!--{/if}-->
		</td>
		<td><!--{$volist.merchantpid}--></td>
		<td class="text_center">
		<!--{if $volist.flag=='1'}-->
			<font color="green">开启</font>
		<!--{else}-->
			<font color="gray">关闭</font>
		<!--{/if}-->
		</td>
		<td class="text_center"><!--{$volist.orders}--></td>
		<td class="text_center">
		 <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.sdkid}-->&<!--{$comeurl}-->" class="oe_ico_blue">编辑</a>
		</td>
	  </tr>
	  <!--{/foreach}-->
	  <!--{/if}-->
	</table>

	<div class="oe_page_box"><!--{$showpage}--></div>

  </div>
</div>
<!--{/if}-->

<!--{if $a == 'edit'}-->
<div class="oemarry_layout">
  <div class="oe_top_nav">
	<i></i>接口设置->支付接口->编辑
	<span><a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->">&lt;&lt;返回列表</a></span>
  </div>
  <div class="oe_txtwrap">
	  支付宝商户ID申请地址：<a href="https://b.alipay.com/" target="_blank">https://b.alipay.com/</a> （企业注册即时到帐或担保交易，个人注册担保交易）<br />
	  财付通商户ID申请地址：<a href="http://mch.tenpay.com/market/ps_intro_08.shtml" target="_blank">http://mch.tenpay.com/market/ps_intro_08.shtml</a> （集成即时到帐）<br />
	  网银在线商户ID申请地址：<a href="http://www.chinabank.com.cn/" target="_blank">http://www.chinabank.com.cn/</a> (申请企业账号)<br />
	  易宝支付申请地址：<a href="http://www.yeepay.com/" target="_blank">http://www.yeepay.com/</a> (注册企业帐号)<br />
	  <b><font color="red">类型说明</font></b><br />
	  wangyin：网银在线，alipay：支付宝即时到账(企业)，alipayescow：支付宝担保交易(个人&企业)<br />
	  tenpay：财付通即时到账(个人&企业)，yeepay：易宝支付(企业)
  </div>
  <div class="oe_content">
    <h6>编辑支付接口</h6>
	<form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post" />
	<input type="hidden" name="a" id="a" value="saveedit" />
	<input type="hidden" name="id" id="id" value="<!--{$id}-->" />
    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">支付接口：<span class="f_red"></span></th>
		<td width="85%">
		<!--{$paysdk.sdkname}-->
		<!--{if $paysdk.type == 'pc'}-->
		<font color="blue">（适用于电脑PC）</font>
		<!--{else}-->
		<font color="orange">（适用于手机WAP）</font>
		<!--{/if}-->
		</td>
	  </tr>
	  <tr>
	    <th>标题：<span class="f_red"></span></th>
		<td>
		  <input type="text" name="title" id="title" class="input-b" value="<!--{$paysdk.title}-->" />
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>商户ID：<span class="f_red"></span></th>
		<td>
		  <input type="text" name="merchantpid" id="merchantpid" class="input-b" value="<!--{$paysdk.merchantpid}-->" />
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <!--{if $paysdk.sdkname == 'wapyjpay'}-->
	  <tr>
	    <th>商户RSA私钥：<span class="f_red"></span></th>
		<td>
		  <textarea name="yjpayprivatekey" id="yjpayprivatekey" style="width:50%;height:60px;"><!--{$paysdk.yjpayprivatekey}--></textarea>
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>商户RSA公钥：<span class="f_red"></span></th>
		<td>
		  <textarea name="yjpaypublickey" id="yjpaypublickey" style="width:50%;height:60px;"><!--{$paysdk.yjpaypublickey}--></textarea>
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>易宝RSA公钥：<span class="f_red"></span></th>
		<td>
		  <textarea name="yeepaypublickey" id="yeepaypublickey" style="width:50%;height:60px;"><!--{$paysdk.yeepaypublickey}--></textarea>
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <!--{else}-->
	  <tr>
	    <th>支付密钥：<span class="f_red"></span></th>
		<td>
		  <input type="text" name="privatekey" id="privatekey" class="input-b" value="<!--{$paysdk.privatekey}-->" />
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>收款帐号：<span class="f_red"></span></th>
		<td>
		  <input type="text" name="merchantaccount" id="merchantaccount" class="input-b" value="<!--{$paysdk.merchantaccount}-->" /> （支付宝接口需填写此项）
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <!--{/if}-->

	  <tr>
	    <th>排序：<span class="f_red"></span></th>
		<td>
		  <input type="text" name="orders" id="orders" class="input-s" value="<!--{$paysdk.orders}-->" />
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>启用状态：<span class="f_red"></span></th>
		<td>
		  <input type="radio" name="flag" id="flag" value="1"<!--{if $paysdk.flag == '1'}--> checked<!--{/if}--> />开启，
		  <input type="radio" name="flag" id="flag" value="0"<!--{if $paysdk.flag == '0'}--> checked<!--{/if}--> />关闭
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <th>描述说明：<span class="f_red"></span></th>
		<td>
		  <textarea name="intro" id="intro" style="width:50%;height:60px;"><!--{$paysdk.intro}--></textarea>
		  <span class="oe_trap"></span>
		</td>
	  </tr>
	  <tr>
	    <td></td>
		<td> <input type="button" id="btn_save" class="button_2" value="编辑保存" /> </td>
	  </tr>
	</table>
	</form>
  </div>
</div>
<script type="text/javascript">
$(function(){

	$("#btn_save").bind("click", function(){

		if ($("#title").val().length == 0) {
			ToastShow("标题不能为空", "title");
			return false;
		}
		$("#myform").submit();
	});
});
</script>
<!--{/if}-->
</body>
</html>