-
Notifications
You must be signed in to change notification settings - Fork 4
/
quickpay_conf.php
173 lines (155 loc) · 4.58 KB
/
quickpay_conf.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
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
<?php
/*
* @file quickpay_service.inc.php
* @author fengmin(felix021@gmail.com)
* @date 2011-08-22
* @version $Revision$
*
*/
class quickpay_conf
{
const VERIFY_HTTPS_CERT = false;
static $timezone = "Asia/Shanghai"; //时区
static $sign_method = "md5"; //摘要算法,目前仅支持md5 (2011-08-22)
static $security_key = "88888888"; //商户密钥
//支付请求预定义字段
static $pay_params = array(
'version' => '1.0.0',
'charset' => 'UTF-8', //UTF-8, GBK等
'merId' => '105550149170027', //商户填写
'acqCode' => '', //收单机构填写
'merCode' => '', //收单机构填写
'merAbbr' => '商户名称',
);
static $urls = array(
'test' => array(
'front' => 'http://58.246.226.99/UpopWeb/api/Pay.action',
'back' => 'http://58.246.226.99/UpopWeb/api/BSPay.action',
'query' => 'http://58.246.226.99/UpopWeb/api/Query.action',
),
'preonline' => array(
'front' => 'http://www.epay.lxdns.com/UpopWeb/api/Pay.action',
'back' => 'http://www.epay.lxdns.com/UpopWeb/api/BSPay.action',
'query' => 'http://www.epay.lxdns.com//UpopWeb/api/Query.action',
),
'online' => array(
'front' => 'https://unionpaysecure.com/api/Pay.action',
'back' => 'https://besvr.unionpaysecure.com/api/BSPay.action',
'query' => 'https://query.unionpaysecure.com/api/Query.action',
),
);
const FRONT_PAY = 1;
const BACK_PAY = 2;
const RESPONSE = 3;
const QUERY = 4;
const CONSUME = "01";
const CONSUME_VOID = "31";
const PRE_AUTH = "02";
const PRE_AUTH_VOID = "32";
const PRE_AUTH_COMPLETE = "03";
const PRE_AUTH_VOID_COMPLETE = "33";
const REFUND = "04";
const REGISTRATION = "71";
const CURRENCY_CNY = "156";
//支付请求可为空字段(但必须填写)
static $pay_params_empty = array(
"origQid" => "",
"acqCode" => "",
"merCode" => "",
"commodityUrl" => "",
"commodityName" => "",
"commodityUnitPrice"=> "",
"commodityQuantity" => "",
"commodityDiscount" => "",
"transferFee" => "",
"customerName" => "",
"defaultPayType" => "",
"defaultBankNumber" => "",
"transTimeout" => "",
"merReserved" => "",
);
//支付请求必填字段检查
static $pay_params_check = array(
"version",
"charset",
"transType",
"origQid",
"merId",
"merAbbr",
"acqCode",
"merCode",
"commodityUrl",
"commodityName",
"commodityUnitPrice",
"commodityQuantity",
"commodityDiscount",
"transferFee",
"orderNumber",
"orderAmount",
"orderCurrency",
"orderTime",
"customerIp",
"customerName",
"defaultPayType",
"defaultBankNumber",
"transTimeout",
"frontEndUrl",
"backEndUrl",
"merReserved",
);
//查询请求必填字段检查
static $query_params_check = array(
"version",
"charset",
"transType",
"merId",
"orderNumber",
"orderTime",
"merReserved",
);
//商户保留域可能包含的字段
static $mer_params_reserved = array(
// NEW NAME OLD NAME
"cardNumber", "pan",
"cardPasswd", "password",
"credentialType", "idType",
"cardCvn2", "cvn",
"cardExpire", "expire",
"credentialNumber", "idNo",
"credentialName", "name",
"phoneNumber", "mobile",
"merAbstract",
//tdb only
"orderTimeoutDate",
"origOrderNumber",
"origOrderTime",
);
static $notify_param_check = array(
"version",
"charset",
"transType",
"respCode",
"respMsg",
"respTime",
"merId",
"merAbbr",
"orderNumber",
"traceNumber",
"traceTime",
"qid",
"orderAmount",
"orderCurrency",
"settleAmount",
"settleCurrency",
"settleDate",
"exchangeRate",
"exchangeDate",
"cupReserved",
"signMethod",
"signature",
);
static $sign_ignore_params = array(
"bank",
);
}
?>