forked from 1izheng/xpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dingdingPay4.html
executable file
·120 lines (107 loc) · 7.4 KB
/
dingdingPay4.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
<!DOCTYPE html>
<html>
<head>
<meta 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">
<script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
<link href="css/hipay.css" rel="stylesheet" type="text/css">
<link href="css/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>
</head>
<div class="aui-free-head">
<a href="javascript:goAliPay();" class="aui-button">
<button>立即支付</button>
</a>
</div>
<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.inc.min.js"></script>
<script>
ap.allowPullDownRefresh(false);
ap.onPullDownRefresh(function(res){
if(!res.refreshAvailable){
ap.alert({
content: '刷新已禁止',
buttonText: '恢复'
}, function(){
ap.allowPullDownRefresh(true);
ap.showToast('刷新已恢复')
});
}
});
// var orderStr = ('service="alipay.fund.stdtrustee.order.create.pay"&partner="2088801132166875"&_input_charset="utf-8"¬ify_url="https://repay.dingtalk.com/RENotify/alipay_fund_stdtrustee_order_create_pay"&out_order_no="kjIqMPSN_190871480100"&out_request_no="kjIqMPSN_190871480100_s"&product_code="SOCIAL_RED_PACKETS"&scene_code="MERCHANT_COUPON"&amount="0.01"&pay_strategy="CASHIER_PAYMENT"&receipt_strategy="INNER_ACCOUNT_RECEIPTS"&platform="DEFAULT"&channel="APP"&order_title="发送钉钉红包"&master_order_no="2019031010002001270209801523"&order_type="DEDUCT_ORDER"&extra_param="{"payeeShowName":"钉钉红包"}"&pay_timeout="30m"&order_expired_time="60d"&out_context="{"dingtalk_biz_tag":"red_envelop"}"&sign="IGWNeOQlhGooCG%2FBDVpCHSkvFn4t80fqvhShZCJV4tjhJ1zTT1ZtYO7DoXs9mQCfRvalQJqIwC8f6xjnCUx%2Bg0q1I2LXbGoisoPV1iB8Zz2a3hnvJ8EUkkCWnnTow6tsZmHAXXR5f%2FcNy4%2Bdh3%2B4jXWEf%2B1eCN4NGwzy5ZjXRC5A2CfO0xZc6xO2wPwHtsIDIXu89%2FVm0et%2BQvfETyZnMdY8ZPzPisZ30RUwM7woWa11gJohvijMwA3UgcUKF4gnvwW4Da1roDs4IWHDDB9OsyqX7ZN%2BOOY61pKwpj20Zz3AkwR6jk8VIaBI25aPIDWj6yYvAbpgCTmN12dcJLG%2B%2Fg%3D%3D"&sign_type="RSA"');
//log(decodeURIComponent(orderStr));
function goAliPay() {
// var orderStr = ('service="alipay.fund.stdtrustee.order.create.pay"&partner="2088801132166875"&_input_charset="utf-8"¬ify_url="https://repay.dingtalk.com/RENotify/alipay_fund_stdtrustee_order_create_pay"&out_order_no="3hnKTRMx_300509187100"&out_request_no="3hnKTRMx_300509187100_s"&product_code="SOCIAL_RED_PACKETS"&scene_code="MERCHANT_COUPON"&amount="0.02"&pay_strategy="CASHIER_PAYMENT"&receipt_strategy="INNER_ACCOUNT_RECEIPTS"&platform="DEFAULT"&channel="APP"&order_title="发送钉钉红包"&master_order_no="2019031010002001700206685416"&order_type="DEDUCT_ORDER"&extra_param="{"payeeShowName":"钉钉红包"}"&pay_timeout="30m"&order_expired_time="60d"&out_context="{"dingtalk_biz_tag":"red_envelop"}"&sign="H6Y4cCf44KLYZ%2FBS0v%2B%2FKr2d%2FFqChu2W4UqWBISR1AZ3v4HzTHQqED2rIbVY%2FGOZh7cDloHhO0MdbDDmchC8VKXAZKqLxZvjxJBBc1vwLeVkJc02RXzaL6Ci%2FYO6WwygwFErjvUANZwS9orjnhz%2FjtYe%2BpWmKrf1JhVHHrVhZTnsZUA8m9WbBCpzQKthyz8gkOlYZmc7Y2seDWYaeXsPQ7P8UdmImQTKhk8oJzWl5sQiCCtTHttEUAF1Qza5RhcOqUih4BGnhOAcMhw36bjdZPWws1zQUYBSWhqVTldHdF1CcEvgAsxCIFOxiFkfLT%2BXiwX8367CO6ZAtmv%2FU56xFg%3D%3D"&sign_type="RSA"')
var orderStr = ('service="alipay.fund.stdtrustee.order.create.pay"&partner="2088801132166875"&_input_charset="utf-8"¬ify_url="https://repay.dingtalk.com/RENotify/alipay_fund_stdtrustee_order_create_pay"&out_order_no="3hnPzIYy_621243159100"&out_request_no="3hnPzIYy_621243159100_s"&product_code="SOCIAL_RED_PACKETS"&scene_code="MERCHANT_COUPON"&amount="0.01"&pay_strategy="CASHIER_PAYMENT"&receipt_strategy="INNER_ACCOUNT_RECEIPTS"&platform="DEFAULT"&channel="APP"&order_title="发送钉钉红包"&master_order_no="2019031110002001350232273824"&order_type="DEDUCT_ORDER"&extra_param="{"payeeShowName":"钉钉红包"}"&pay_timeout="30m"&order_expired_time="60d"&out_context="{"dingtalk_biz_tag":"red_envelop"}"&sign="aELIgjCwPIEnrRbJvdRp%2F2z1tceD5v4v0ccfMbOaMgoDD978saI4Yo6PF3%2FyK9IauIkJ%2F7W4NETbRmZks%2FAiPx9ZZW2WQA3XXJ76w%2BgfbMwe%2FjSzGC09ztOeYCc53WqWQBakEulRa0lPfvwRloY1ABMVNhVh4dI5Ep6cj5fcfTJaCmt0UdaBu8LHnHPcfb%2F7EC%2BYRBe55acfzhMlwWLWrNt816tG%2FnEu59Ziw%2BO3uVfW%2FCqRrEKCLUE%2BqeCZtfrE4mucT2UrxMe%2B90YbCs3%2BteASrv6%2FQD21ZVLXcA3xWg0Yd%2BI4%2BFEoYolrypS6NODpEr%2FBeiL3AhBY7C%2F60gf%2Blg%3D%3D"&sign_type="RSA"')
var orderSt1 = ('service="alipay.fund.stdtrustee.order.create.pay"&partner="2088801132166875"&_input_charset="utf-8"¬ify_url="https://repay.dingtalk.com/RENotify/alipay_fund_stdtrustee_order_create_pay"&out_order_no="8XuJMY2M_93360064100"&out_request_no="8XuJMY2M_93360064100_s"&product_code="SOCIAL_RED_PACKETS"&scene_code="MERCHANT_COUPON"&amount="9999.00"&pay_strategy="CASHIER_PAYMENT"&receipt_strategy="INNER_ACCOUNT_RECEIPTS"&platform="DEFAULT"&channel="APP"&order_title="发送钉钉红包"&master_order_no="2019031110002001190232565716"&order_type="DEDUCT_ORDER"&extra_param="{"payeeShowName":"钉钉红包"}"&pay_timeout="30m"&order_expired_time="60d"&out_context="{"dingtalk_biz_tag":"red_envelop"}"&sign="YEm4%2Bb4jzUAp%2BygIPxseSjEyDsdVn59EH4Fhn2IcbPqglpKz01O%2FD6W%2FhNMl32Q7w3CVHkdFWGOudtaIHHt3YCjR4tgkCvJDcggpYSdeJ1%2Fd5Zqv7g7v3Rxjxf5H%2FYTUMzBCEFfw5Ufvr4zUHtUAxiwXr%2BnimhBHMYdaF1%2F9i7r%2FX6RomkTYPupQ%2FOv2Mie6aCytM2VesN3JTTRcpZNpfTjQZxur1z2w%2F87KTgkS1dWVSbIMMHa2ngQvfR3fSyKd0N045J5msn69GUQ2m6thZzLr5anIGkUUeWr6kBCGy%2BxY3dukdV86z1TS2j8HVkuqPJ5RlHOwFPjzMHXuAMW6Eg%3D%3D"&sign_type="RSA"')
ap.tradePay({
orderStr:orderSt1
}, function(result){
if(result.resultCode==9000||result.resultCode=="9000"){
alert("支付已完成");
}
});
}
</script>
</html>