1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* For PayPal ECS the request type genericpayment ist mandatory |
4
|
|
|
* |
5
|
|
|
* NOTICE OF LICENSE |
6
|
|
|
* |
7
|
|
|
* This source file is subject to the GNU General Public License (GPL 3) |
8
|
|
|
* that is bundled with this package in the file LICENSE.txt |
9
|
|
|
* |
10
|
|
|
* DISCLAIMER |
11
|
|
|
* |
12
|
|
|
* Do not edit or add to this file if you wish to upgrade Payone to newer |
13
|
|
|
* versions in the future. If you wish to customize Payone for your |
14
|
|
|
* needs please refer to http://www.payone.de for more information. |
15
|
|
|
|
16
|
|
|
* @category Payone |
17
|
|
|
* @package Payone_Api |
18
|
|
|
* @subpackage Request |
19
|
|
|
* @author Ronny Schröder |
20
|
|
|
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3) |
21
|
|
|
*/ |
22
|
|
|
class Payone_Api_Request_Genericpayment extends Payone_Api_Request_Abstract |
23
|
|
|
{ |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Sub account ID |
27
|
|
|
* |
28
|
|
|
* @var int |
29
|
|
|
*/ |
30
|
|
|
protected $aid = NULL; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
*/ |
35
|
|
|
protected $clearingtype = NULL; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Total amount (in smallest currency unit! e.g. cent) |
39
|
|
|
* |
40
|
|
|
* @var int |
41
|
|
|
*/ |
42
|
|
|
protected $amount = NULL; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Currency (ISO-4217) |
46
|
|
|
* |
47
|
|
|
* @var string |
48
|
|
|
*/ |
49
|
|
|
protected $currency = NULL; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* dynamic text for debit and creditcard payments |
53
|
|
|
* |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $narrative_text = NULL; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var Payone_Api_Request_Parameter_Authorization_DeliveryData |
60
|
|
|
*/ |
61
|
|
|
protected $deliveryData = null; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @var string |
65
|
|
|
*/ |
66
|
|
|
protected $financingtype = NULL; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* With the first genericpayment the workorderid will be generated from the |
70
|
|
|
* PAYONE platform and will be sent to you in the response. The ID is unique. |
71
|
|
|
* The returned workorderid is mandatory for the following requests of |
72
|
|
|
* PayPal Express Checkout. |
73
|
|
|
* |
74
|
|
|
* @var string |
75
|
|
|
*/ |
76
|
|
|
protected $workorderid = NULL; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Wallet provider PPE: PayPal Express |
80
|
|
|
* @var Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet |
81
|
|
|
*/ |
82
|
|
|
protected $wallet = null; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @var Payone_Api_Request_Parameter_Authorization_PaymentMethod_RatePay |
86
|
|
|
*/ |
87
|
|
|
protected $ratePay = null; |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Mandatory for PayPal ECS: |
91
|
|
|
* 1. action=setexpresscheckout |
92
|
|
|
* 2. action=getexpresscheckoutdetails |
93
|
|
|
* |
94
|
|
|
* @var Payone_Api_Request_Parameter_Paydata_Paydata |
95
|
|
|
*/ |
96
|
|
|
protected $paydata = NULL; |
97
|
|
|
|
98
|
|
|
protected $company = null; |
99
|
|
|
protected $firstname = null; |
100
|
|
|
protected $lastname = null; |
101
|
|
|
protected $street = null; |
102
|
|
|
protected $zip = null; |
103
|
|
|
protected $city = null; |
104
|
|
|
protected $country = null; |
105
|
|
|
|
106
|
|
|
protected $api_version = null; |
107
|
|
|
protected $birthday = null; |
108
|
|
|
protected $email = null; |
109
|
|
|
protected $ip = null; |
110
|
|
|
protected $language = null; |
111
|
|
|
protected $telephonenumber = null; |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @var Payone_Api_Request_Parameter_Invoicing_Transaction |
115
|
|
|
*/ |
116
|
|
|
protected $invoicing = null; |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param array $data |
120
|
|
|
*/ |
121
|
|
|
public function __construct(array $data = array()) |
122
|
|
|
{ |
123
|
|
|
$this->request = Payone_Api_Enum_RequestType::GENERICPAYMENT; |
124
|
|
|
parent::__construct($data); |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param int $aid |
130
|
|
|
*/ |
131
|
|
|
public function setAid($aid) |
132
|
|
|
{ |
133
|
|
|
$this->aid = $aid; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @return int |
138
|
|
|
*/ |
139
|
|
|
public function getAid() |
140
|
|
|
{ |
141
|
|
|
return $this->aid; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @param int $amount |
146
|
|
|
*/ |
147
|
|
|
public function setAmount($amount) |
148
|
|
|
{ |
149
|
|
|
$this->amount = $amount; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @return int |
154
|
|
|
*/ |
155
|
|
|
public function getAmount() |
156
|
|
|
{ |
157
|
|
|
return $this->amount; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @param string $clearingtype |
162
|
|
|
*/ |
163
|
|
|
public function setClearingtype($clearingtype) |
164
|
|
|
{ |
165
|
|
|
$this->clearingtype = $clearingtype; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* @return string |
170
|
|
|
*/ |
171
|
|
|
public function getClearingtype() |
172
|
|
|
{ |
173
|
|
|
return $this->clearingtype; |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* @param string $financingtype |
178
|
|
|
*/ |
179
|
|
|
public function setFinancingType($financingtype) |
180
|
|
|
{ |
181
|
|
|
$this->financingtype = $financingtype; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @return string |
186
|
|
|
*/ |
187
|
|
|
public function getFinancingType() |
188
|
|
|
{ |
189
|
|
|
return $this->financingtype; |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* @param string $currency |
194
|
|
|
*/ |
195
|
|
|
public function setCurrency($currency) |
196
|
|
|
{ |
197
|
|
|
$this->currency = $currency; |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* @return string |
202
|
|
|
*/ |
203
|
|
|
public function getCurrency() |
204
|
|
|
{ |
205
|
|
|
return $this->currency; |
206
|
|
|
} |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* @param string $narrative_text |
210
|
|
|
*/ |
211
|
|
|
public function setNarrativeText($narrative_text) |
212
|
|
|
{ |
213
|
|
|
$this->narrative_text = $narrative_text; |
214
|
|
|
} |
215
|
|
|
|
216
|
|
|
/** |
217
|
|
|
* @return string |
218
|
|
|
*/ |
219
|
|
|
public function getNarrativeText() |
220
|
|
|
{ |
221
|
|
|
return $this->narrative_text; |
222
|
|
|
} |
223
|
|
|
|
224
|
|
|
/** |
225
|
|
|
* @param Payone_Api_Request_Parameter_Authorization_DeliveryData $deliveryData |
226
|
|
|
*/ |
227
|
|
|
public function setDeliveryData(Payone_Api_Request_Parameter_Authorization_DeliveryData $deliveryData) |
228
|
|
|
{ |
229
|
|
|
$this->deliveryData = $deliveryData; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* @return Payone_Api_Request_Parameter_Authorization_DeliveryData |
234
|
|
|
*/ |
235
|
|
|
public function getDeliveryData() |
236
|
|
|
{ |
237
|
|
|
return $this->deliveryData; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* |
242
|
|
|
* @return string |
243
|
|
|
*/ |
244
|
|
|
function getWorkorderId() |
|
|
|
|
245
|
|
|
{ |
246
|
|
|
return $this->workorderid; |
247
|
|
|
} |
248
|
|
|
|
249
|
|
|
/** |
250
|
|
|
* |
251
|
|
|
* @param string $workorderid |
252
|
|
|
*/ |
253
|
|
|
function setWorkorderId($workorderid) |
|
|
|
|
254
|
|
|
{ |
255
|
|
|
$this->workorderid = $workorderid; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @return Payone_Api_Request_Parameter_Authorization_PaymentMethod_RatePay |
260
|
|
|
*/ |
261
|
|
|
function getRatePay() |
|
|
|
|
262
|
|
|
{ |
263
|
|
|
return $this->ratePay; |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* @param Payone_Api_Request_Parameter_Authorization_PaymentMethod_RatePay $ratePay |
268
|
|
|
*/ |
269
|
|
|
function setRatePay(Payone_Api_Request_Parameter_Authorization_PaymentMethod_RatePay $ratePay) |
|
|
|
|
270
|
|
|
{ |
271
|
|
|
$this->ratePay = $ratePay; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* |
276
|
|
|
* @return Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet |
277
|
|
|
*/ |
278
|
|
|
function getWallet() |
|
|
|
|
279
|
|
|
{ |
280
|
|
|
return $this->wallet; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* |
285
|
|
|
* @param Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet $wallet |
286
|
|
|
*/ |
287
|
|
|
function setWallet(Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet $wallet) |
|
|
|
|
288
|
|
|
{ |
289
|
|
|
$this->wallet = $wallet; |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* @param Payone_Api_Request_Parameter_Paydata_Paydata $paydata |
294
|
|
|
*/ |
295
|
|
|
public function setPaydata($paydata) |
296
|
|
|
{ |
297
|
|
|
$this->paydata = $paydata; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* |
302
|
|
|
* @return Payone_Api_Request_Parameter_Paydata_Paydata |
303
|
|
|
*/ |
304
|
|
|
public function getPaydata() |
305
|
|
|
{ |
306
|
|
|
return $this->paydata; |
307
|
|
|
} |
308
|
|
|
|
309
|
|
|
public function setCompany($company) |
310
|
|
|
{ |
311
|
|
|
$this->company = $company; |
312
|
|
|
} |
313
|
|
|
|
314
|
|
|
public function getCompany() |
315
|
|
|
{ |
316
|
|
|
return $this->company; |
317
|
|
|
} |
318
|
|
|
|
319
|
|
|
public function setFirstname($firstname) |
320
|
|
|
{ |
321
|
|
|
$this->firstname = $firstname; |
322
|
|
|
} |
323
|
|
|
|
324
|
|
|
public function getFirstname() |
325
|
|
|
{ |
326
|
|
|
return $this->firstname; |
327
|
|
|
} |
328
|
|
|
|
329
|
|
|
public function setLastname($lastname) |
330
|
|
|
{ |
331
|
|
|
$this->lastname = $lastname; |
332
|
|
|
} |
333
|
|
|
|
334
|
|
|
public function getLastname() |
335
|
|
|
{ |
336
|
|
|
return $this->lastname; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
public function setStreet($street) |
340
|
|
|
{ |
341
|
|
|
$this->street = $street; |
342
|
|
|
} |
343
|
|
|
|
344
|
|
|
public function getStreet() |
345
|
|
|
{ |
346
|
|
|
return $this->street; |
347
|
|
|
} |
348
|
|
|
|
349
|
|
|
public function setZip($zip) |
350
|
|
|
{ |
351
|
|
|
$this->zip = $zip; |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
public function getZip() |
355
|
|
|
{ |
356
|
|
|
return $this->zip; |
357
|
|
|
} |
358
|
|
|
|
359
|
|
|
public function setCity($city) |
360
|
|
|
{ |
361
|
|
|
$this->city = $city; |
362
|
|
|
} |
363
|
|
|
|
364
|
|
|
public function getCity() |
365
|
|
|
{ |
366
|
|
|
return $this->city; |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
public function setCountry($country) |
370
|
|
|
{ |
371
|
|
|
$this->country = $country; |
372
|
|
|
} |
373
|
|
|
|
374
|
|
|
public function getCountry() |
375
|
|
|
{ |
376
|
|
|
return $this->country; |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
public function setApiVersion($api_version) |
380
|
|
|
{ |
381
|
|
|
$this->api_version = $api_version; |
382
|
|
|
} |
383
|
|
|
|
384
|
|
|
public function getApiVersion() |
385
|
|
|
{ |
386
|
|
|
return $this->api_version; |
387
|
|
|
} |
388
|
|
|
|
389
|
|
|
public function setBirthday($birthday) |
390
|
|
|
{ |
391
|
|
|
$this->birthday = $birthday; |
392
|
|
|
} |
393
|
|
|
|
394
|
|
|
public function getBirthday() |
395
|
|
|
{ |
396
|
|
|
return $this->birthday; |
397
|
|
|
} |
398
|
|
|
|
399
|
|
|
public function setEmail($email) |
400
|
|
|
{ |
401
|
|
|
$this->email = $email; |
402
|
|
|
} |
403
|
|
|
|
404
|
|
|
public function getEmail() |
405
|
|
|
{ |
406
|
|
|
return $this->email; |
407
|
|
|
} |
408
|
|
|
|
409
|
|
|
public function setIp($ip) |
410
|
|
|
{ |
411
|
|
|
$this->ip = $ip; |
412
|
|
|
} |
413
|
|
|
|
414
|
|
|
public function getIp() |
415
|
|
|
{ |
416
|
|
|
return $this->ip; |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
public function setLanguage($language) |
420
|
|
|
{ |
421
|
|
|
$this->language = $language; |
422
|
|
|
} |
423
|
|
|
|
424
|
|
|
public function getLanguage() |
425
|
|
|
{ |
426
|
|
|
return $this->language; |
427
|
|
|
} |
428
|
|
|
|
429
|
|
|
public function setTelephonenumber($telephonenumber) |
430
|
|
|
{ |
431
|
|
|
$this->telephonenumber = $telephonenumber; |
432
|
|
|
} |
433
|
|
|
|
434
|
|
|
public function getTelephonenumber() |
435
|
|
|
{ |
436
|
|
|
return $this->telephonenumber; |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
/** |
440
|
|
|
* @param \Payone_Api_Request_Parameter_Invoicing_Transaction $invoicing |
441
|
|
|
*/ |
442
|
|
|
public function setInvoicing(Payone_Api_Request_Parameter_Invoicing_Transaction $invoicing) |
443
|
|
|
{ |
444
|
|
|
$this->invoicing = $invoicing; |
445
|
|
|
} |
446
|
|
|
|
447
|
|
|
/** |
448
|
|
|
* @return \Payone_Api_Request_Parameter_Invoicing_Transaction |
449
|
|
|
*/ |
450
|
|
|
public function getInvoicing() |
451
|
|
|
{ |
452
|
|
|
return $this->invoicing; |
453
|
|
|
} |
454
|
|
|
|
455
|
|
|
} |
456
|
|
|
|
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.