作者 魏强

转移支付

<!DOCTYPE html>
<html>
<head>
<title>微信支付</title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/lanren.css">
<script type="text/javascript">
//调用微信JS api 支付
function jsApiCall()
{
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
{$jsApiParameters},
function(res){
WeixinJSBridge.log(res.err_msg);
alert(res.err_code+res.err_desc+res.err_msg);
if (res.err_msg=='get_brand_wcpay_request:cancel'){
//支付取消逻辑
}else if (res.err_msg=='get_brand_wcpay_request:ok'){
//支付成功逻辑
}else{
//支付失败逻辑
}
}
);
}
function callpay()
{
if (typeof WeixinJSBridge == "undefined"){
if( document.addEventListener ){
document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
}else if (document.attachEvent){
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
}
}else{
jsApiCall();
}
}
</script>
</head>
<body>
<div class="wenx_xx">
<div class="mz">DEF0000000001</div>
<div class="wxzf_price">¥0.01</div>
</div>
<div class="skf_xinf">
<div class="all_w"> <span class="bt">收款方</span> <span class="fr">{$site_info.site_name}</span> </div>
</div>
<a onclick="callpay()" class="ljzf_but all_w">立即支付</a>
<script type="text/javascript">
callpay();
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html>
<head>
<title>微信支付成功</title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/lanren.css">
</head>
<body >
<div class="zfcg_box ">
<div class="all_w">
<img src="__TMPL__/public/assets/images/cg_03.jpg" > 支付成功 </div>
</div>
<div class="cgzf_info">
<div class="wenx_xx">
<div class="mz">{$site_info.site_name|default='请定义商品名称'}</div>
<div class="wxzf_price">¥{$info.real_price|default='请定义商品金额'}</div>
</div>
<div class="spxx_shop">
<div class=" mlr_pm">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>交易时间</td>
<td align="right">{$info.pay_time|date='Y-m-d H:i:s',###}</td>
</tr>
<tr>
<td>商户单号</td>
<td align="right">{$info.order_sn|default='请定义商户单号'}</td>
</tr>
<tr>
<td>交易单号</td>
<td align="right">{$info.transaction_id|default='请定义交易单号'}</td>
</tr>
</table>
</div>
</div>
</div>
<div class="wzxfcgde_tb"><img src="__TMPL__/public/assets/images/cg_07.jpg" ></div>
</body>
</html>
\ No newline at end of file
... ...