AlipayAcquirePrecreateRequest.php
7.6 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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<?php
/**
* ALIPAY API: alipay.acquire.precreate request
*
* @author auto create
* @since 1.0, 2018-05-22 11:49:56
*/
class AlipayAcquirePrecreateRequest
{
/**
* 对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body
**/
private $body;
/**
* 描述多渠道收单的渠道明细信息,json格式
**/
private $channelParameters;
/**
* 订单金额币种。目前只支持传入156(人民币)。
如果为空,则默认设置为156
**/
private $currency;
/**
* 公用业务扩展信息。用于商户的特定业务信息的传递,只有商户与支付宝约定了传递此参数且约定了参数含义,此参数才有效。
比如可传递二维码支付场景下的门店ID等信息,以json格式传输。
**/
private $extendParams;
/**
* 描述商品明细信息,json格式。
**/
private $goodsDetail;
/**
* 订单支付超时时间。设置未付款交易的超时时间,一旦超时,该笔交易就会自动被关闭。
取值范围:1m~15d。
m-分钟,h-小时,d-天,1c-当天(无论交易何时创建,都在0点关闭)。
该参数数值不接受小数点,如1.5h,可转换为90m。
该功能需要联系支付宝配置关闭时间。
**/
private $itBPay;
/**
* 操作员的类型:
0:支付宝操作员
1:商户的操作员
如果传入其它值或者为空,则默认设置为1
**/
private $operatorCode;
/**
* 卖家的操作员ID
**/
private $operatorId;
/**
* 支付宝合作商户网站唯一订单号
**/
private $outTradeNo;
/**
* 订单中商品的单价。
如果请求时传入本参数,则必须满足total_fee=price×quantity的条件
**/
private $price;
/**
* 订单中商品的数量。
如果请求时传入本参数,则必须满足total_fee=price×quantity的条件
**/
private $quantity;
/**
* 分账信息。
描述分账明细信息,json格式
**/
private $royaltyParameters;
/**
* 分账类型。卖家的分账类型,目前只支持传入ROYALTY(普通分账类型)
**/
private $royaltyType;
/**
* 卖家支付宝账号,可以为email或者手机号。如果seller_id不为空,则以seller_id的值作为卖家账号,忽略本参数
**/
private $sellerEmail;
/**
* 卖家支付宝账号对应的支付宝唯一用户号,以2088开头的纯16位数字。如果和seller_email同时为空,则本参数默认填充partner的值
**/
private $sellerId;
/**
* 收银台页面上,商品展示的超链接
**/
private $showUrl;
/**
* 商品购买
**/
private $subject;
/**
* 订单金额。该笔订单的资金总额,取值范围[0.01,100000000],精确到小数点后2位。
**/
private $totalFee;
private $apiParas = array();
private $terminalType;
private $terminalInfo;
private $prodCode;
private $apiVersion="1.0";
private $notifyUrl;
private $returnUrl;
private $needEncrypt=false;
public function setBody($body)
{
$this->body = $body;
$this->apiParas["body"] = $body;
}
public function getBody()
{
return $this->body;
}
public function setChannelParameters($channelParameters)
{
$this->channelParameters = $channelParameters;
$this->apiParas["channel_parameters"] = $channelParameters;
}
public function getChannelParameters()
{
return $this->channelParameters;
}
public function setCurrency($currency)
{
$this->currency = $currency;
$this->apiParas["currency"] = $currency;
}
public function getCurrency()
{
return $this->currency;
}
public function setExtendParams($extendParams)
{
$this->extendParams = $extendParams;
$this->apiParas["extend_params"] = $extendParams;
}
public function getExtendParams()
{
return $this->extendParams;
}
public function setGoodsDetail($goodsDetail)
{
$this->goodsDetail = $goodsDetail;
$this->apiParas["goods_detail"] = $goodsDetail;
}
public function getGoodsDetail()
{
return $this->goodsDetail;
}
public function setItBPay($itBPay)
{
$this->itBPay = $itBPay;
$this->apiParas["it_b_pay"] = $itBPay;
}
public function getItBPay()
{
return $this->itBPay;
}
public function setOperatorCode($operatorCode)
{
$this->operatorCode = $operatorCode;
$this->apiParas["operator_code"] = $operatorCode;
}
public function getOperatorCode()
{
return $this->operatorCode;
}
public function setOperatorId($operatorId)
{
$this->operatorId = $operatorId;
$this->apiParas["operator_id"] = $operatorId;
}
public function getOperatorId()
{
return $this->operatorId;
}
public function setOutTradeNo($outTradeNo)
{
$this->outTradeNo = $outTradeNo;
$this->apiParas["out_trade_no"] = $outTradeNo;
}
public function getOutTradeNo()
{
return $this->outTradeNo;
}
public function setPrice($price)
{
$this->price = $price;
$this->apiParas["price"] = $price;
}
public function getPrice()
{
return $this->price;
}
public function setQuantity($quantity)
{
$this->quantity = $quantity;
$this->apiParas["quantity"] = $quantity;
}
public function getQuantity()
{
return $this->quantity;
}
public function setRoyaltyParameters($royaltyParameters)
{
$this->royaltyParameters = $royaltyParameters;
$this->apiParas["royalty_parameters"] = $royaltyParameters;
}
public function getRoyaltyParameters()
{
return $this->royaltyParameters;
}
public function setRoyaltyType($royaltyType)
{
$this->royaltyType = $royaltyType;
$this->apiParas["royalty_type"] = $royaltyType;
}
public function getRoyaltyType()
{
return $this->royaltyType;
}
public function setSellerEmail($sellerEmail)
{
$this->sellerEmail = $sellerEmail;
$this->apiParas["seller_email"] = $sellerEmail;
}
public function getSellerEmail()
{
return $this->sellerEmail;
}
public function setSellerId($sellerId)
{
$this->sellerId = $sellerId;
$this->apiParas["seller_id"] = $sellerId;
}
public function getSellerId()
{
return $this->sellerId;
}
public function setShowUrl($showUrl)
{
$this->showUrl = $showUrl;
$this->apiParas["show_url"] = $showUrl;
}
public function getShowUrl()
{
return $this->showUrl;
}
public function setSubject($subject)
{
$this->subject = $subject;
$this->apiParas["subject"] = $subject;
}
public function getSubject()
{
return $this->subject;
}
public function setTotalFee($totalFee)
{
$this->totalFee = $totalFee;
$this->apiParas["total_fee"] = $totalFee;
}
public function getTotalFee()
{
return $this->totalFee;
}
public function getApiMethodName()
{
return "alipay.acquire.precreate";
}
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl=$notifyUrl;
}
public function getNotifyUrl()
{
return $this->notifyUrl;
}
public function setReturnUrl($returnUrl)
{
$this->returnUrl=$returnUrl;
}
public function getReturnUrl()
{
return $this->returnUrl;
}
public function getApiParas()
{
return $this->apiParas;
}
public function getTerminalType()
{
return $this->terminalType;
}
public function setTerminalType($terminalType)
{
$this->terminalType = $terminalType;
}
public function getTerminalInfo()
{
return $this->terminalInfo;
}
public function setTerminalInfo($terminalInfo)
{
$this->terminalInfo = $terminalInfo;
}
public function getProdCode()
{
return $this->prodCode;
}
public function setProdCode($prodCode)
{
$this->prodCode = $prodCode;
}
public function setApiVersion($apiVersion)
{
$this->apiVersion=$apiVersion;
}
public function getApiVersion()
{
return $this->apiVersion;
}
public function setNeedEncrypt($needEncrypt)
{
$this->needEncrypt=$needEncrypt;
}
public function getNeedEncrypt()
{
return $this->needEncrypt;
}
}