123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531 |
- {template '_header'}
-
- <style>
- .tabs-container .tab-pane .panel-body {border-left: none; border-right: none; border-bottom: none;}
- </style>
-
- <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
- <div class="page-heading">
- <span class="pull-right">
- {ifp 'sysset.payset.edit'}
- <input type="submit" value="提交" class="btn btn-primary" />
- {/if}
- </span>
- <h2>支付方式</h2>
- </div>
-
- {if $resp['code']!=200}
- <div class="alert alert-danger">
- <p style="font-size:18px;font-weight: bold;word-break: break-all">{$url} 访问受限, 请检查您的服务器设置</p>
- <p style="font-size:18px;font-weight: bold;word-break: break-all">HTTP 错误代码: {$resp['code']}</p>
- </div>
- {/if}
-
- <div class="tabs-container">
- <ul class="nav nav-tabs" id="myTab">
- <li class="active"><a href="#tab_wechat">支付设置</a></li>
- <li><a href="#tab_wap">WAP端</a></li>
- {if com('h5app')}
- <li><a href="#tab_app">APP端</a></li>
- {/if}
- <li><a href="#tab_alipay">支付宝打款</a></li>
- <li><a href="#tab_paytype">打款方式</a></li>
- </ul>
- <div class="tab-content ">
-
- <!-- 微信端开始-->
- <div class="tab-pane active" id="tab_wechat">
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>商城支付</h4>
- <span>
- <p class="text text-danger">如果是微信支付,授权目录与“支付选项”中的说明不同,应在 公众平台->微信支付->公众号支付 追加一条支付授权目录: <b>{$_W['siteroot']}app/</b> </p>
- <p class="text text-danger"><b>特约商户一般申请没有订单或者充值余额退款权限,需要 <a href='http://kf.qq.com/faq/120911VrYVrA150929imAfuU.html' target="_blank">点击跳转</a> 在这里申请一下 </b></p>
- </span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[weixin]" value="1" {if $data['weixin']==1}checked{/if} />
- </div>
- </div>
- <div class="panel-body" id='certs' {if empty($data['weixin'])}style="display:none"{/if}>
- <div class="form-group">
- <label class="col-sm-2 control-label">选择支付</label>
- <div class="col-sm-9 col-xs-12">
- {ifp 'sysset.payset.edit'}
- <select name='data[weixin_id]' class='form-control'>
- <option value='0'>未选择任何支付</option>
- {loop $payments $val}
- <option value='{$val['id']}' {if $data['weixin_id']==$val['id']}selected{/if}>{$val['title']}</option>
- {/loop}
- </select>
- {else}
- <div class='form-control-static'></div>
- {/if}
- </div>
- </div>
- </div>
- </div>
-
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>余额支付</h4>
- <span>开启后,粉丝可以用账户余额去商城消费.</span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[credit]" value="1" {if $data['credit']==1}checked{/if} />
- </div>
- </div>
- </div>
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>货到付款</h4>
- <span>如果要支持货到付款,也需要将商品设置成货到付款。</span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[cash]" value="1" {if $data['cash']==1}checked{/if} />
- </div>
- </div>
- </div>
- </div>
- <!--微信端 结束-->
-
-
- <!--wap端开始-->
- <div class="tab-pane " id="tab_wap">
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>支付宝支付</h4>
- <p> 在开启支付宝支付方式前,请到 <a href='{php echo url('profile/payment')}' target="_blank">支付选项</a> 去设置好参数。(微信中支付宝支付也属于WAP支付)</p>
- <p class="text text-danger">如果未选择新版支付宝,则默认使用旧版。</p>
- <p class="text text-danger">新版支付宝请到 <a href="{php echo weburl('sysset/payment')}"><b>【支付管理】</b></a>页面添加模板</p>
- <p class="text text-danger">请在使用新版支付宝之前,确保之前支付宝支付订单已经完结,以免造成不必要的调整。</p>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[alipay]" value="1" {if $data['alipay']==1}checked{/if} />
- </div>
- </div>
- <div class="form-group" id="alipay" {if $data['alipay']==0}style="display: none;"{/if}>
- <label class="col-sm-2 control-label">新版支付宝</label>
- <div class="col-sm-9 col-xs-12">
- {ifp 'sysset.payset.edit'}
- <select name='data[alipay_id]' class='form-control'>
- <option value='0'>未选择任何支付</option>
- {loop $paymentalis $val}
- <option value='{$val['id']}' {if $data['alipay_id']==$val['id']}selected{/if}>{$val['title']}</option>
- {/loop}
- </select>
- {else}
- <div class='form-control-static'></div>
- {/if}
- </div>
- </div>
- </div>
- </div>
- <!--wap端结束-->
-
- <!--app端开始-->
- <div class="tab-pane " id="tab_app">
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>微信支付</h4>
- <span> 开启后在APP中可以调起微信进行支付</span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[app_wechat]" value="1" {if $data['app_wechat']==1}checked{/if} />
- </div>
- </div>
-
- <div class="panel-body" id="app_wechat" {if empty($data['app_wechat'])}style="display:none"{/if}>
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信AppId</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[app_wechat_appid]" class="form-control" value="{if !empty($sec['app_wechat']['appid'])}{$sec['app_wechat']['appid']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_wechat']['appid'])}{$sec['app_wechat']['appid']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信AppSecret</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[app_wechat_appsecret]" class="form-control" value="{if !empty($sec['app_wechat']['appsecret'])}{$sec['app_wechat']['appsecret']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_wechat']['appsecret'])}{$sec['app_wechat']['appsecret']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户名称</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[app_wechat_merchname]" class="form-control" value="{if !empty($sec['app_wechat']['merchname'])}{$sec['app_wechat']['merchname']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_wechat']['merchname'])}{$sec['app_wechat']['merchname']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户ID</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[app_wechat_merchid]" class="form-control" value="{if !empty($sec['app_wechat']['merchid'])}{$sec['app_wechat']['merchid']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_wechat']['merchid'])}{$sec['app_wechat']['merchid']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户API密钥</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[app_wechat_apikey]" class="form-control" value="{if !empty($sec['app_wechat']['apikey'])}{$sec['app_wechat']['apikey']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_wechat']['apikey'])}{$sec['app_wechat']['apikey']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-2 control-label">CERT证书文件</label>
- <div class="col-sm-9 col-xs-12">
- <input type="hidden" name="data[app_wechat_cert]" value="{$data['app_wechat_cert']}"/>
- {ifp 'sysset.payset.edit'}
-
- <input type="file" name="app_wechat_cert_file" class="form-control" />
- <span class="help-block">
- {if !empty($sec['app_wechat']['cert'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- 下载证书 cert.zip 中的 apiclient_cert.pem 文件</span>
- {else}
- {if !empty($sec['app_wechat']['cert'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- {/if}
-
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">KEY密钥文件</label>
- <div class="col-sm-9 col-xs-12">
- <input type="hidden" name="data[app_wechat_key]" value="{$data['app_wechat_key']}"/>
- {ifp 'sysset.payset.edit'}
-
- <input type="file" name="app_wechat_key_file" class="form-control" />
- <span class="help-block">
- {if !empty($sec['app_wechat']['key'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- 下载证书 cert.zip 中的 apiclient_key.pem 文件
- </span>
- {else}
- {if !empty($sec['app_wechat']['key'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- {/if}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">ROOT文件</label>
- <div class="col-sm-9 col-xs-12">
- <input type="hidden" name="data[app_wechat_root]" value="{$data['app_wechat_root']}"/>
- {ifp 'sysset.payset.edit'}
-
- <input type="file" name="app_wechat_root_file" class="form-control" />
- <span class="help-block">
- {if !empty($sec['app_wechat']['root'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- 下载证书 cert.zip 中的 rootca.pem 文件,新下载证书无需上传此文件!
- </span>
- {else}
- {if !empty($sec['app_wechat']['root'])}
- <span class='label label-success'>已上传</span>
- {else}
- <span class='label label-danger'>未上传</span>
- {/if}
- {/if}
- </div>
- </div>
- </div>
- </div>
-
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>支付宝支付</h4>
- <span> 开启后在APP中可以调起支付宝进行支付</span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[app_alipay]" value="1" {if $data['app_alipay']==1}checked{/if} />
- </div>
- </div>
-
- <div class="panel-body" id="app_alipay" {if empty($data['app_alipay'])}style="display:none"{/if}>
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">APPID</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input class="form-control" name="data[app_alipay_appid]" value="{if !empty($sec['app_alipay']['appid'])}{$sec['app_alipay']['appid']}{/if}" />
- <div class="help-block">开放平台应用id</div>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_alipay']['appid'])}{$sec['app_alipay']['appid']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付宝公钥(public_key)</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <textarea name="data[app_alipay_public_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['public_key'])}{$sec['app_alipay']['public_key']}{/if}</textarea>
- <div class="help-block">一行且不能有空格</div>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_alipay']['public_key'])}{$sec['app_alipay']['public_key']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">应用私钥(private_key)</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <textarea name="data[app_alipay_private_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['private_key'])}{$sec['app_alipay']['private_key']}{/if}</textarea>
- <div class="help-block">一行且不能有空格</div>
- {else}
- <div class='form-control-static'>{if !empty($sec['app_alipay']['private_key'])}{$sec['app_alipay']['private_key']}{/if}</div>
- {/if}
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--app端结束-->
-
- <!--支付宝打款 开始-->
- <div class="tab-pane " id="tab_alipay">
- <div class="panel panel-default" >
- <div class="panel-body">
- <div class="col-sm-9 col-xs-12">
- <h4>支付宝打款</h4>
- <span> 开启之后,佣金打款,可以使用支付宝(前提是要登录支付宝)</span>
- </div>
- <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
- <input type="checkbox" class="js-switch" name="data[alipay_pay][open]" value="1" {if !empty($sec['alipay_pay']['open'])}checked{/if} />
- </div>
- </div>
-
- <div class="panel-body" id="alipay_pay" {if empty($sec['alipay_pay']['open'])}style="display:none"{/if}>
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">合作伙伴身份(PID)</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[alipay_pay][partner]" class="form-control" value="{if !empty($sec['alipay_pay']['partner'])}{$sec['alipay_pay']['partner']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['alipay_pay']['partner'])}{$sec['alipay_pay']['partner']}{/if}</div>
- {/if}
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付账户姓名</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[alipay_pay][account_name]" class="form-control" value="{if !empty($sec['alipay_pay']['account_name'])}{$sec['alipay_pay']['account_name']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['alipay_pay']['account_name'])}{$sec['alipay_pay']['account_name']}{/if}</div>
- {/if}
- <div class="help-block">支付宝实名认证的名称(个人就填写个人姓名,企业就填写企业名称 , 要与支付宝上面的认证姓名一致)</div>
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付账号</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[alipay_pay][email]" class="form-control" value="{if !empty($sec['alipay_pay']['email'])}{$sec['alipay_pay']['email']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['alipay_pay']['email'])}{$sec['alipay_pay']['email']}{/if}</div>
- {/if}
- <div class="help-block">支付宝账号 一般是 email </div>
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">MD5秘钥</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <input type="text" name="data[alipay_pay][key]" class="form-control" value="{if !empty($sec['alipay_pay']['key'])}{$sec['alipay_pay']['key']}{/if}"/>
- {else}
- <div class='form-control-static'>{if !empty($sec['alipay_pay']['key'])}{$sec['alipay_pay']['key']}{/if}</div>
- {/if}
- <div class="help-block">安全校验码(key)MD5密钥 </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--支付宝打款 结束-->
-
- <!--微信打款方式 开始-->
- <div class="tab-pane " id="tab_paytype">
- <div class="panel-body">
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">佣金打款</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <label class="radio-inline"><input type="radio" name="data[paytype][commission]" value="0" {if empty($data['paytype']['commission'])}checked="checked"{/if}/>企业打款</label>
- <label class="radio-inline"><input type="radio" name="data[paytype][commission]" value="1" {if $data['paytype']['commission'] == '1'}checked="checked"{/if}/>红包付款</label>
- {else}
- <div class='form-control-static'>{if empty($data['paytype']['commission'])}企业打款{else}红包付款{/if}</div>
- {/if}
- <span class="help-block">一般 小额打款 可以用微信红包 建议使用微信打款金额 超过1000</span>
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">提现申请</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="0" {if empty($data['paytype']['withdraw'])}checked="checked"{/if}/>企业打款</label>
- <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="1" {if $data['paytype']['withdraw'] == '1'}checked="checked"{/if}/>红包付款</label>
- {else}
- <div class='form-control-static'>{if empty($data['paytype']['withdraw'])}企业打款{else}红包付款{/if}</div>
- {/if}
- <span class="help-block">一般 小额打款 可以用微信红包 建议使用微信打款金额 超过1000</span>
- </div>
- </div>
-
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label must">红包金额</label>
- <div class="col-sm-9">
- {ifp 'sysset.payset.edit'}
- <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="0" {if empty($data['paytype']['redpack'])}checked="checked"{/if}/>188元</label>
- <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="1" {if $data['paytype']['redpack'] == '1'}checked="checked"{/if}/>288元</label>
- <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="2" {if $data['paytype']['redpack'] == '2'}checked="checked"{/if}/>388元</label>
- {else}
- <div class='form-control-static'>{if empty($data['paytype']['redpack'])}188元{elseif $data['paytype']['redpack'] == '1'}288元{else}388元{/if}</div>
- {/if}
- <span class="help-block">如果选用 红包打款 , 请选择每个红包最大面值;<br/>如果是 申请额度是 500 元 选择的是 188元 红包 将会发送 两个188元红包 和 一个 124元 红包</span>
- </div>
- </div>
- </div>
- </div>
-
-
- </div>
- </div>
-
- </form>
- </div>
-
- <script type="text/javascript">
- require(['bootstrap'], function () {
- $('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
- })
- });
- $(function () {
- $(":checkbox[name='data[weixin]']").click(function () {
- var weixin_sub = $(":checkbox[name='data[weixin_sub]']");
- if ($(this).prop('checked')) {
- $("#certs").show();
- if(weixin_sub.next().hasClass("checked")){
- weixin_sub.next().click();
- }
- }
- else {
- $("#certs").hide();
- }
- });
- $(":checkbox[name='data[weixin_jie]']").click(function () {
- var weixin_jie_sub = $(":checkbox[name='data[weixin_jie_sub]']");
- if ($(this).prop('checked')) {
- $("#weixin_jie").show();
- if(weixin_jie_sub.next().hasClass("checked")){
- weixin_jie_sub.next().click();
- }
- }
- else {
- $("#weixin_jie").hide();
- }
- });
-
- $(":checkbox[name='data[weixin_sub]']").click(function () {
- var weixin = $(":checkbox[name='data[weixin]']");
- if ($(this).prop('checked')) {
- $("#weixin_sub").show();
- if(weixin.next().hasClass("checked")){
- weixin.next().click();
- }
- }
- else {
- $("#weixin_sub").hide();
- }
- });
-
- $(":checkbox[name='data[weixin_jie_sub]']").click(function () {
- var weixin_jie = $(":checkbox[name='data[weixin_jie]']");
- if ($(this).prop('checked')) {
- $("#weixin_jie_sub").show();
- if(weixin_jie.next().hasClass("checked")){
- weixin_jie.next().click();
- }
- }
- else {
- $("#weixin_jie_sub").hide();
- }
- });
-
- $(":checkbox[name='data[app_wechat]']").click(function () {
- if ($(this).prop('checked')) {
- $("#app_wechat").show();
- }
- else {
- $("#app_wechat").hide();
- }
- });
-
- $(":checkbox[name='data[app_alipay]']").click(function () {
- if ($(this).prop('checked')) {
- $("#app_alipay").show();
- }
- else {
- $("#app_alipay").hide();
- }
- });
-
- $(":checkbox[name='data[alipay_pay][open]']").click(function () {
- if ($(this).prop('checked')) {
- $("#alipay_pay").show();
- }
- else {
- $("#alipay_pay").hide();
- }
- });
-
- })
- </script>
- {template '_footer'}
|