ThinkAdmin/application/index/view/wap.payjs.html
2017-04-14 17:27:54 +08:00

43 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSAPI支付DEMO</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body style="text-align:center">
<div class="contrainer">
<h3>JSAPI支付DEMO</h3>
<hr/>
<p class="price">金额: 0.01</p>
<hr/>
<p class="orderno">订单号13412341234</p>
<hr/>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">立即支付</button>
</div>
</div>
</div>
</body>
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
wx.error(function (e) {
console.log(e);
});
wx.config($.parseJSON('{$jsSign|json_encode}'));
wx.ready(function () {
$('[type="submit"]').on('click', function () {
$.get('{:url("payjs")}', {'action': 'options'}, function (ret) {
wx.chooseWXPay(ret);
});
});
});
</script>
</html>