-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestPay.html
More file actions
45 lines (38 loc) · 1.4 KB
/
testPay.html
File metadata and controls
45 lines (38 loc) · 1.4 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>jasonPayTest</title>
</head>
<body>
<div class="container" id="wechat" style="display: none;">
<div style="text-align: center;">
<img src="http://qr.liantu.com/api.php?text=wxp://f2f0lGxS0y-AT4xJ9IIXI_nKcp3U2b2b_W0L">
<h3>please use wechat, long presh and pay</h3>
</div>
</div>
</body>
</html>
<script language="javascript">
var ua = navigator.userAgent.toLowerCase();
var url;
if(ua.match(/MicroMessenger/i)=="micromessenger") {
goandpay2();
} else if(ua.match(/AlipayClient/i)=="alipayclient"){
goandpay();
} else{
alert("please use wechat or alipay");
}
function goandpay(){
//alert("alipay");
window.open("HTTPS://QR.ALIPAY.COM/FKX09508CLUZB0JA2UHC36");
window.location.href="HTTPS://QR.ALIPAY.COM/FKX09508CLUZB0JA2UHC36";
}
function goandpay2(){
//alert("wechat");
document.getElementById("wechat").removeAttribute("style");
window.open("wxp://f2f0lGxS0y-AT4xJ9IIXI_nKcp3U2b2b_W0L");
window.location.href="wxp://f2f0lGxS0y-AT4xJ9IIXI_nKcp3U2b2b_W0L";
}
</script>