Commit a79f222a authored by xiabin's avatar xiabin

添加支付宝支付的return url

parent 25444040
...@@ -36,7 +36,7 @@ $jsApiParameters = $tools->GetJsApiParameters($order); ...@@ -36,7 +36,7 @@ $jsApiParameters = $tools->GetJsApiParameters($order);
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/> <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>微信支付样例-支付</title> <title>微信支付</title>
<script type="text/javascript"> <script type="text/javascript">
//调用微信JS api 支付 //调用微信JS api 支付
function jsApiCall() { function jsApiCall() {
...@@ -44,8 +44,11 @@ $jsApiParameters = $tools->GetJsApiParameters($order); ...@@ -44,8 +44,11 @@ $jsApiParameters = $tools->GetJsApiParameters($order);
'getBrandWCPayRequest', 'getBrandWCPayRequest',
<?php echo $jsApiParameters; ?>, <?php echo $jsApiParameters; ?>,
function (res) { function (res) {
WeixinJSBridge.log(res.err_msg); if(res.err_msg == "get_brand_wcpay_request:ok" ) {
alert(res.err_code + res.err_desc + res.err_msg); window.history.go(-1);
}else{
window.history.go(-1);
} //
} }
); );
} }
...@@ -62,16 +65,10 @@ $jsApiParameters = $tools->GetJsApiParameters($order); ...@@ -62,16 +65,10 @@ $jsApiParameters = $tools->GetJsApiParameters($order);
jsApiCall(); jsApiCall();
} }
} }
callpay();
</script> </script>
</head> </head>
<body> <body>
<br/> <br/>
<font color="#9ACD32"><b>该笔订单支付金额为<span style="color:#f00;font-size:50px"><?= $price ?></span</b></font><br/><br/>
<div align="center">
<button
style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer; color:white; font-size:16px;"
type="button" onclick="callpay()">立即支付
</button>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment