-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
50 lines (41 loc) · 1.24 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.3.min.js"></script>
<script src="../../resources/js/pingpp-pc.js"></script>
<script>
$(function () {
$("#pay-btn").click(function () {
console.log('button-clicked');
$.ajax({
url: "http://localhost:3005/pingpp/charge", success: function (charge) {
var object = JSON.parse(charge);
console.dir(object);
$("#qrcode").attr('src', object.credential.alipay_qr);
}
});
});
})();
</script>
</head>
<body>
<div id="container">
<h1>Test</h1>
<h2><?php echo $title ?></h2>
<div id="body">
<form method="post" action="http://up.qiniu.com" enctype="multipart/form-data">
<input name="token" placeholder="token">
<input name="file" type="file"/>
<input type="submit" value="上传"/>
</form>
</div>
<div>
<button id="pay-btn">pay</button>
<img id="qrcode" src="">
</div>
</div>
</body>
</html>