【调度系统】广东民航医疗快线调度系统源代码
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?php 
header("Content-type: text/html; charset=utf-8");
require_once 'model/builder/AlipayTradeRefundContentBuilder.php';
require_once 'service/AlipayTradeService.php';
 
if (!empty($_POST['out_trade_no'])&& trim($_POST['out_trade_no'])!=""){
    
    $out_trade_no = trim($_POST['out_trade_no']);
    $refund_amount = trim($_POST['refund_amount']);
    $out_request_no = trim($_POST['out_request_no']);
 
    //第三方应用授权令牌,商户授权系统商开发模式下使用
    $appAuthToken = "";//根据真实值填写
    
    //创建退款请求builder,设置参数
    $refundRequestBuilder = new AlipayTradeRefundContentBuilder();
        $refundRequestBuilder->setOutTradeNo($out_trade_no);
        $refundRequestBuilder->setRefundAmount($refund_amount);
        $refundRequestBuilder->setOutRequestNo($out_request_no);
 
        $refundRequestBuilder->setAppAuthToken($appAuthToken);
 
    //初始化类对象,调用refund获取退款应答
    $refundResponse = new AlipayTradeService($config);
    $refundResult =    $refundResponse->refund($refundRequestBuilder);
 
    //根据交易状态进行处理
    switch ($refundResult->getTradeStatus()){
        case "SUCCESS":
            echo "支付宝退款成功:"."<br>--------------------------<br>";
            print_r($refundResult->getResponse());
            break;
        case "FAILED":
            echo "支付宝退款失败!!!"."<br>--------------------------<br>";
            if(!empty($refundResult->getResponse())){
                print_r($refundResult->getResponse());
            }
            break;
        case "UNKNOWN":
            echo "系统异常,订单状态未知!!!"."<br>--------------------------<br>";
            if(!empty($refundResult->getResponse())){
                print_r($refundResult->getResponse());
            }
            break;
        default:
            echo "不支持的交易状态,交易返回异常!!!";
            break;
    }
    return ;
}
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
    <title>支付宝当面付 交易退款</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
*{
    margin:0;
    padding:0;
}
ul,ol{
    list-style:none;
}
.title{
    color: #ADADAD;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 16px 5px 10px;
}
.hidden{
    display:none;
}
 
.new-btn-login-sp{
    border:1px solid #D74C00;
    padding:1px;
    display:inline-block;
}
 
.new-btn-login{
    background-color: transparent;
    background-image: url("../img/new-btn-fixed.png");
    border: medium none;
}
.new-btn-login{
    background-position: 0 -198px;
    width: 82px;
    color: #FFFFFF;
    font-weight: bold;
    height: 28px;
    line-height: 28px;
    padding: 0 10px 3px;
}
.new-btn-login:hover{
    background-position: 0 -167px;
    width: 82px;
    color: #FFFFFF;
    font-weight: bold;
    height: 28px;
    line-height: 28px;
    padding: 0 10px 3px;
}
.bank-list{
    overflow:hidden;
    margin-top:5px;
}
.bank-list li{
    float:left;
    width:153px;
    margin-bottom:5px;
}
 
#main{
    width:750px;
    margin:0 auto;
    font-size:14px;
    font-family:'宋体';
}
#logo{
    background-color: transparent;
    background-image: url("../img/new-btn-fixed.png");
    border: medium none;
    background-position:0 0;
    width:166px;
    height:35px;
    float:left;
}
.red-star{
    color:#f00;
    width:10px;
    display:inline-block;
}
.null-star{
    color:#fff;
}
.content{
    margin-top:5px;
}
 
.content dt{
    width:160px;
    display:inline-block;
    text-align:right;
    float:left;
    
}
.content dd{
    margin-left:100px;
    margin-bottom:5px;
}
#foot{
    margin-top:10px;
}
.foot-ul li {
    text-align:center;
}
.note-help {
    color: #999999;
    font-size: 12px;
    line-height: 130%;
    padding-left: 3px;
}
 
.cashier-nav {
    font-size: 14px;
    margin: 15px 0 10px;
    text-align: left;
    height:30px;
    border-bottom:solid 2px #CFD2D7;
}
.cashier-nav ol li {
    float: left;
}
.cashier-nav li.current {
    color: #AB4400;
    font-weight: bold;
}
.cashier-nav li.last {
    clear:right;
}
.alipay_link {
    text-align:right;
}
.alipay_link a:link{
    text-decoration:none;
    color:#8D8D8D;
}
.alipay_link a:visited{
    text-decoration:none;
    color:#8D8D8D;
}
</style>
</head>
<body text=#000000 bgColor="#ffffff" leftMargin=0 topMargin=4>
    <div id="main">
        <div id="head">
            <dl class="alipay_link">
                <a target="_blank" href="http://www.alipay.com/"><span>支付宝首页</span></a>|
                <a target="_blank" href="https://b.alipay.com/home.htm"><span>商家服务</span></a>|
                <a target="_blank" href="http://help.alipay.com/support/index_sh.htm"><span>帮助中心</span></a>
            </dl>
            <span class="title">支付宝 当面付2.0  订单退款接口</span>
        </div>
        <div class="cashier-nav">
            <ol>
                <li class="current">1、确认信息 →</li>
                <li>2、点击确认 →</li>
                <li class="last">3、确认完成</li>
            </ol>
        </div>
        <form name=alipayment action="" method=post target="_blank">
            <div id="body" style="clear:left">
                <dl class="content">
                    <dt>商户订单号:</dt>
                    <dd>
                        <span class="null-star">*</span>
                        <input size="30" name="out_trade_no" />
                        <span>必填</span>
                    </dd>
                    
                    <dt>退款金额:</dt>
                    <dd>
                        <span class="null-star">*</span>
                        <input size="30" name="refund_amount" />
                        <span>必填 , 不能超过订单总金额</span>
                    </dd>
                    
                    <dt>退款批次号:</dt>
                    <dd>
                        <span class="null-star">*</span>
                        <input size="30" name="out_request_no" />
                        <span>必填   , 部分退款时,同一订单号不同批次号代表对同一笔订单进行多次退款</span>
                    </dd>
                    
                    
                    <dt></dt>
                    <dd>
                        <span class="new-btn-login-sp">
                            <button class="new-btn-login" type="submit" style="text-align:center;">确 认</button>
                        </span>
                    </dd>
                </dl>
            </div>
        </form>
        <div id="foot">
            <ul class="foot-ul">
                <li><font class="note-help">如果您点击“确认”按钮,即表示您同意该次的执行操作。 </font></li>
                <li>
                    支付宝版权所有 2011-2015 ALIPAY.COM 
                </li>
            </ul>
        </div>
    </div>
</body>
</html>