forked from Blokura/Epay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcashier.php
115 lines (111 loc) · 3.98 KB
/
cashier.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
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
<?php
$is_defend=true;
$nosession = true;
require './includes/common.php';
@header('Content-Type: text/html; charset=UTF-8');
$other=isset($_GET['other'])?true:false;
$trade_no=daddslashes($_GET['trade_no']);
$sitename=base64_decode(daddslashes($_GET['sitename']));
$row=$DB->getRow("SELECT * FROM pre_order WHERE trade_no='{$trade_no}' limit 1");
if(!$row)sysmsg('该订单号不存在,请返回来源地重新发起请求!');
if($row['status']==1)sysmsg('该订单已完成支付,请勿重复支付');
$gid = $DB->getColumn("SELECT gid FROM pre_user WHERE uid='{$row['uid']}' limit 1");
$paytype = \lib\Channel::getTypes($gid);
?>
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0" name="viewport">
<title>收银台 | <?php echo $sitename?$sitename:$conf['sitename']?> </title>
<link href="/assets/css/reset.css" rel="stylesheet" type="text/css">
<link href="/assets/css/main12.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color:#f9f9f9">
<!--导航-->
<div class="w100 navBD12">
<div class="w1080 nav12">
<div class="nav12-left">
<a href="javascript:;"><img src="/assets/img/logo.png"></a>
|收银台
</div>
</div>
</div>
<input type="hidden" name="trade_no" value="<?php echo $trade_no?>"/>
<!--订单金额-->
<?php if($other){?>
<div class="w1080 order-amount12" style="height: auto;">
<h2><font style="color: red">当前支付方式暂时关闭维护,请更换其他方式支付</font></h2>
</div>
<?php }else{?>
<div class="w1080 order-amount12">
<ul class="order-amount12-left">
<li>
<span>商品名称:</span>
<span><?php echo $row['name']?></span>
</li>
<li>
<span>订单号:</span>
<span><?php echo $trade_no?></span>
</li>
<li>
<span>创建时间:</span>
<span><?php echo $row['addtime']?></span>
</li>
</ul>
<div class="order-amount12-right">
<span>订单金额:</span>
<strong><?php echo $row['money']?></strong>
<span>元</span>
</div>
</div>
<?php }?>
<!--支付方式-->
<div class="w1080 PayMethod12">
<div class="row">
<h2>支付方式</h2>
<ul class="types">
<?php foreach($paytype as $rows){?>
<li class="pay_li" value="<?php echo $rows['id']?>">
<img src="/assets/icon/<?php echo $rows['name']?>.ico">
<span><?php echo $rows['showname']?></span>
</li>
<?php }?>
</ul>
</div>
</div>
<!--立即支付-->
<div class="w1080 immediate-pay12">
<div class="immediate-pay12-right">
<span>需支付:<strong><?php echo $row['realmoney']?></strong>元<?php if($row['realmoney'] && $row['realmoney']!=$row['money'])echo '(包含'.($row['realmoney']-$row['money']).'元手续费)';?></span>
<a class="immediate_pay">立即支付</a>
</div>
</div>
<div class="mt_agree">
<div class="mt_agree_main">
<h2>提示信息</h2>
<p id="errorContent" style="text-align:center;line-height:36px;"></p>
<a class="close_btn">确定</a>
</div>
</div>
<!--底部-->
<div class="w1080 footer12">
<p> <?php echo $sitename?$sitename:$conf['sitename']?></p>
</div>
<script src="//cdn.staticfile.org/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".types li").click(function(){
$(".types li").each(function(){
$(this).attr('class','');
});
$(this).attr('class','active');
});
$(document).on("click", ".immediate_pay", function () {
var value = $(".types").find('.active').attr('value');
var trade_no = $("input[name='trade_no']").val();
window.location.href='./submit2.php?typeid='+value+'&trade_no='+trade_no;
});
$(".types li:first").click();
})
</script>
</body>
</html>