1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Loevgaard\Dandomain\Pay; |
4
|
|
|
|
5
|
|
|
use Loevgaard\Dandomain\Pay\PaymentRequest\OrderLine; |
6
|
|
|
use Symfony\Component\HttpFoundation\Request; |
7
|
|
|
|
8
|
|
|
class PaymentRequest |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* @var string |
12
|
|
|
*/ |
13
|
|
|
protected $apiKey; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @var string |
17
|
|
|
*/ |
18
|
|
|
protected $merchant; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var int |
22
|
|
|
*/ |
23
|
|
|
protected $orderId; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
protected $sessionId; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
protected $currencySymbol; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var float |
37
|
|
|
*/ |
38
|
|
|
protected $totalAmount; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string |
42
|
|
|
*/ |
43
|
|
|
protected $callBackUrl; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
protected $fullCallBackOkUrl; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
protected $callBackOkUrl; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @var string |
57
|
|
|
*/ |
58
|
|
|
protected $callBackServerUrl; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var int |
62
|
|
|
*/ |
63
|
|
|
protected $languageId; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var boolean |
67
|
|
|
*/ |
68
|
|
|
protected $testMode; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @var int |
72
|
|
|
*/ |
73
|
|
|
protected $paymentGatewayCurrencyCode; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var int |
77
|
|
|
*/ |
78
|
|
|
protected $cardTypeId; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var string |
82
|
|
|
*/ |
83
|
|
|
protected $customerRekvNr; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var string |
87
|
|
|
*/ |
88
|
|
|
protected $customerName; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @var string |
92
|
|
|
*/ |
93
|
|
|
protected $customerCompany; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @var string |
97
|
|
|
*/ |
98
|
|
|
protected $customerAddress; |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @var string |
102
|
|
|
*/ |
103
|
|
|
protected $customerAddress2; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @var string |
107
|
|
|
*/ |
108
|
|
|
protected $customerZipCode; |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @var string |
112
|
|
|
*/ |
113
|
|
|
protected $customerCity; |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @var int |
117
|
|
|
*/ |
118
|
|
|
protected $customerCountryId; |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @var string |
122
|
|
|
*/ |
123
|
|
|
protected $customerCountry; |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @var string |
127
|
|
|
*/ |
128
|
|
|
protected $customerPhone; |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @var string |
132
|
|
|
*/ |
133
|
|
|
protected $customerFax; |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @var string |
137
|
|
|
*/ |
138
|
|
|
protected $customerEmail; |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @var string |
142
|
|
|
*/ |
143
|
|
|
protected $customerNote; |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @var string |
147
|
|
|
*/ |
148
|
|
|
protected $customerCvrnr; |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @var string |
152
|
|
|
*/ |
153
|
|
|
protected $customerCustTypeId; |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @var string |
157
|
|
|
*/ |
158
|
|
|
protected $customerEan; |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @var string |
162
|
|
|
*/ |
163
|
|
|
protected $customerRes1; |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* @var string |
167
|
|
|
*/ |
168
|
|
|
protected $customerRes2; |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @var string |
172
|
|
|
*/ |
173
|
|
|
protected $customerRes3; |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* @var string |
177
|
|
|
*/ |
178
|
|
|
protected $customerRes4; |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @var string |
182
|
|
|
*/ |
183
|
|
|
protected $customerRes5; |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @var string |
187
|
|
|
*/ |
188
|
|
|
protected $customerIp; |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @var string |
192
|
|
|
*/ |
193
|
|
|
protected $deliveryName; |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @var string |
197
|
|
|
*/ |
198
|
|
|
protected $deliveryCompany; |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* @var string |
202
|
|
|
*/ |
203
|
|
|
protected $deliveryAddress; |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* @var string |
207
|
|
|
*/ |
208
|
|
|
protected $deliveryAddress2; |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* @var string |
212
|
|
|
*/ |
213
|
|
|
protected $deliveryZipCode; |
214
|
|
|
|
215
|
|
|
/** |
216
|
|
|
* @var string |
217
|
|
|
*/ |
218
|
|
|
protected $deliveryCity; |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @var int |
222
|
|
|
*/ |
223
|
|
|
protected $deliveryCountryID; |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* @var string |
227
|
|
|
*/ |
228
|
|
|
protected $deliveryCountry; |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @var string |
232
|
|
|
*/ |
233
|
|
|
protected $deliveryPhone; |
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @var string |
237
|
|
|
*/ |
238
|
|
|
protected $deliveryFax; |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* @var string |
242
|
|
|
*/ |
243
|
|
|
protected $deliveryEmail; |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* @var string |
247
|
|
|
*/ |
248
|
|
|
protected $deliveryEan; |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @var string |
252
|
|
|
*/ |
253
|
|
|
protected $shippingMethod; |
254
|
|
|
|
255
|
|
|
/** |
256
|
|
|
* @var float |
257
|
|
|
*/ |
258
|
|
|
protected $shippingFee; |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* @var string |
262
|
|
|
*/ |
263
|
|
|
protected $paymentMethod; |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @var float |
267
|
|
|
*/ |
268
|
|
|
protected $paymentFee; |
269
|
|
|
|
270
|
|
|
/** |
271
|
|
|
* @var string |
272
|
|
|
*/ |
273
|
|
|
protected $loadBalancerRealIp; |
274
|
|
|
|
275
|
|
|
/** |
276
|
|
|
* @var OrderLine[] |
277
|
|
|
*/ |
278
|
|
|
protected $orderLines; |
279
|
|
|
|
280
|
|
|
public function __construct() |
281
|
|
|
{ |
282
|
|
|
$this->orderLines = []; |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
public function populateFromRequest(Request $request) |
286
|
|
|
{ |
287
|
|
|
$numberFormatter = new \NumberFormatter('da_DK', \NumberFormatter::CURRENCY); |
288
|
|
|
$currency = $request->request->get('APICurrencySymbol', ''); |
289
|
|
|
$totalAmount = $numberFormatter->parseCurrency($request->request->get('APITotalAmount', 0), $currency); |
290
|
|
|
$shippingFee = $request->request->get('APIShippingFee', 0); |
291
|
|
|
$paymentFee = $request->request->get('APIPayFee', 0); |
292
|
|
|
|
293
|
|
|
$this->setApiKey($request->request->get('APIkey', '')); |
294
|
|
|
$this->setMerchant($request->request->get('APIMerchant', '')); |
295
|
|
|
$this->setOrderId($request->request->get('APIOrderID', 0)); |
296
|
|
|
$this->setSessionId($request->request->get('APISessionID', '')); |
297
|
|
|
$this->setCurrencySymbol($currency); |
298
|
|
|
$this->setTotalAmount($numberFormatter->parseCurrency($totalAmount, $currency)); |
299
|
|
|
$this->setCallBackUrl($request->request->get('APICallBackUrl', '')); |
300
|
|
|
$this->setFullCallBackOkUrl($request->request->get('APIFullCallBackOKUrl', '')); |
301
|
|
|
$this->setCallBackOkUrl($request->request->get('APICallBackOKUrl', '')); |
302
|
|
|
$this->setCallBackServerUrl($request->request->get('APICallBackServerUrl', '')); |
303
|
|
|
$this->setLanguageId((int)$request->request->get('APILanguageID', 0)); |
304
|
|
|
$this->setTestMode($request->request->get('APITestMode') === 'True'); |
305
|
|
|
$this->setPaymentGatewayCurrencyCode($request->request->get('APIPayGatewayCurrCode', 0)); |
306
|
|
|
$this->setCardTypeId((int)$request->request->get('APICardTypeID', 0)); |
307
|
|
|
$this->setCustomerRekvNr($request->request->get('APICRekvNr', '')); |
308
|
|
|
$this->setCustomerName($request->request->get('APICName', '')); |
309
|
|
|
$this->setCustomerCompany($request->request->get('APICCompany', '')); |
310
|
|
|
$this->setCustomerAddress($request->request->get('APICAddress', '')); |
311
|
|
|
$this->setCustomerAddress2($request->request->get('APICAddress2', '')); |
312
|
|
|
$this->setCustomerZipCode($request->request->get('APICZipCode', '')); |
313
|
|
|
$this->setCustomerCity($request->request->get('APICCity', '')); |
314
|
|
|
$this->setCustomerCountryId((int)$request->request->get('APICCountryID', 0)); |
315
|
|
|
$this->setCustomerCountry($request->request->get('APICCountry', '')); |
316
|
|
|
$this->setCustomerPhone($request->request->get('APICPhone', '')); |
317
|
|
|
$this->setCustomerFax($request->request->get('APICFax', '')); |
318
|
|
|
$this->setCustomerEmail($request->request->get('APICEmail', '')); |
319
|
|
|
$this->setCustomerNote($request->request->get('APICNote', '')); |
320
|
|
|
$this->setCustomerCvrnr($request->request->get('APICcvrnr', '')); |
321
|
|
|
$this->setCustomerCustTypeId((int)$request->request->get('APICCustTypeID', 0)); |
322
|
|
|
$this->setCustomerEan($request->request->get('APICEAN', '')); |
323
|
|
|
$this->setCustomerRes1($request->request->get('APICres1', '')); |
324
|
|
|
$this->setCustomerRes2($request->request->get('APICres2', '')); |
325
|
|
|
$this->setCustomerRes3($request->request->get('APICres3', '')); |
326
|
|
|
$this->setCustomerRes4($request->request->get('APICres4', '')); |
327
|
|
|
$this->setCustomerRes5($request->request->get('APICres5', '')); |
328
|
|
|
$this->setDeliveryName($request->request->get('APIDName', '')); |
329
|
|
|
$this->setDeliveryCompany($request->request->get('APIDCompany', '')); |
330
|
|
|
$this->setDeliveryAddress($request->request->get('APIDAddress', '')); |
331
|
|
|
$this->setDeliveryAddress2($request->request->get('APIDAddress2', '')); |
332
|
|
|
$this->setDeliveryZipCode($request->request->get('APIDZipCode', '')); |
333
|
|
|
$this->setDeliveryCity($request->request->get('APIDCity', '')); |
334
|
|
|
$this->setDeliveryCountryID((int)$request->request->get('APIDCountryID', 0)); |
335
|
|
|
$this->setDeliveryCountry($request->request->get('APIDCountry', '')); |
336
|
|
|
$this->setDeliveryPhone($request->request->get('APIDPhone', '')); |
337
|
|
|
$this->setDeliveryFax($request->request->get('APIDFax', '')); |
338
|
|
|
$this->setDeliveryEmail($request->request->get('APIDEmail', '')); |
339
|
|
|
$this->setDeliveryEan($request->request->get('APIDean', '')); |
340
|
|
|
$this->setShippingMethod($request->request->get('APIShippingMethod', '')); |
341
|
|
|
$this->setShippingFee($numberFormatter->parseCurrency($shippingFee, $currency)); |
342
|
|
|
$this->setPaymentMethod($request->request->get('APIPayMethod', '')); |
343
|
|
|
$this->setPaymentFee($numberFormatter->parseCurrency($paymentFee, $currency)); |
344
|
|
|
$this->setCustomerIp($request->request->get('APICIP', '')); |
345
|
|
|
$this->setLoadBalancerRealIp($request->request->get('APILoadBalancerRealIP', '')); |
346
|
|
|
|
347
|
|
|
// populate order lines |
348
|
|
|
$i = 1; |
349
|
|
|
while (true) { |
350
|
|
|
$exists = $request->request->get('APIBasketProdAmount'.$i, false); |
351
|
|
|
if ($exists === false) { |
352
|
|
|
break; |
353
|
|
|
} |
354
|
|
|
|
355
|
|
|
$price = $request->request->get('APIBasketProdPrice'.$i, 0); |
356
|
|
|
|
357
|
|
|
$orderLine = new OrderLine(); |
358
|
|
|
$orderLine |
359
|
|
|
->setQuantity((int)$request->request->get('APIBasketProdAmount'.$i, 0)) |
360
|
|
|
->setProductNumber($request->request->get('APIBasketProdNumber'.$i, '')) |
361
|
|
|
->setName($request->request->get('APIBasketProdName'.$i, '')) |
362
|
|
|
->setPrice($numberFormatter->parseCurrency($price, $currency)) |
363
|
|
|
->setVat((float)$request->request->get('APIBasketProdVAT'.$i, 0)) |
364
|
|
|
; |
365
|
|
|
$this->addOrderLine($orderLine); |
366
|
|
|
|
367
|
|
|
$i++; |
368
|
|
|
} |
369
|
|
|
} |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* @param string $str |
373
|
|
|
* @return float |
374
|
|
|
*/ |
375
|
|
|
public static function currencyStringToFloat(string $str) : float |
376
|
|
|
{ |
377
|
|
|
$str = preg_replace('/[^0-9]+/', '', $str); |
378
|
|
|
return intval($str) / 100; |
379
|
|
|
} |
380
|
|
|
|
381
|
|
|
/** |
382
|
|
|
* @return string |
383
|
|
|
*/ |
384
|
|
|
public function getApiKey() : string |
385
|
|
|
{ |
386
|
|
|
return $this->apiKey; |
387
|
|
|
} |
388
|
|
|
|
389
|
|
|
/** |
390
|
|
|
* @param string $apiKey |
391
|
|
|
* @return PaymentRequest |
392
|
|
|
*/ |
393
|
|
|
public function setApiKey(string $apiKey) : self |
394
|
|
|
{ |
395
|
|
|
$this->apiKey = $apiKey; |
396
|
|
|
return $this; |
397
|
|
|
} |
398
|
|
|
|
399
|
|
|
/** |
400
|
|
|
* @return string |
401
|
|
|
*/ |
402
|
|
|
public function getMerchant() : string |
403
|
|
|
{ |
404
|
|
|
return $this->merchant; |
405
|
|
|
} |
406
|
|
|
|
407
|
|
|
/** |
408
|
|
|
* @param string $merchant |
409
|
|
|
* @return PaymentRequest |
410
|
|
|
*/ |
411
|
|
|
public function setMerchant(string $merchant) : self |
412
|
|
|
{ |
413
|
|
|
$this->merchant = $merchant; |
414
|
|
|
return $this; |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* @return int |
419
|
|
|
*/ |
420
|
|
|
public function getOrderId() : int |
421
|
|
|
{ |
422
|
|
|
return $this->orderId; |
423
|
|
|
} |
424
|
|
|
|
425
|
|
|
/** |
426
|
|
|
* @param int $orderId |
427
|
|
|
* @return PaymentRequest |
428
|
|
|
*/ |
429
|
|
|
public function setOrderId(int $orderId) : self |
430
|
|
|
{ |
431
|
|
|
$this->orderId = $orderId; |
432
|
|
|
return $this; |
433
|
|
|
} |
434
|
|
|
|
435
|
|
|
/** |
436
|
|
|
* @return string |
437
|
|
|
*/ |
438
|
|
|
public function getSessionId() : string |
439
|
|
|
{ |
440
|
|
|
return $this->sessionId; |
441
|
|
|
} |
442
|
|
|
|
443
|
|
|
/** |
444
|
|
|
* @param string $sessionId |
445
|
|
|
* @return PaymentRequest |
446
|
|
|
*/ |
447
|
|
|
public function setSessionId(string $sessionId) : self |
448
|
|
|
{ |
449
|
|
|
$this->sessionId = $sessionId; |
450
|
|
|
return $this; |
451
|
|
|
} |
452
|
|
|
|
453
|
|
|
/** |
454
|
|
|
* @return string |
455
|
|
|
*/ |
456
|
|
|
public function getCurrencySymbol() : string |
457
|
|
|
{ |
458
|
|
|
return $this->currencySymbol; |
459
|
|
|
} |
460
|
|
|
|
461
|
|
|
/** |
462
|
|
|
* @param string $currencySymbol |
463
|
|
|
* @return PaymentRequest |
464
|
|
|
*/ |
465
|
|
|
public function setCurrencySymbol(string $currencySymbol) : self |
466
|
|
|
{ |
467
|
|
|
$this->currencySymbol = $currencySymbol; |
468
|
|
|
return $this; |
469
|
|
|
} |
470
|
|
|
|
471
|
|
|
/** |
472
|
|
|
* @return float |
473
|
|
|
*/ |
474
|
|
|
public function getTotalAmount() : float |
475
|
|
|
{ |
476
|
|
|
return $this->totalAmount; |
477
|
|
|
} |
478
|
|
|
|
479
|
|
|
/** |
480
|
|
|
* @param float $totalAmount |
481
|
|
|
* @return PaymentRequest |
482
|
|
|
*/ |
483
|
|
|
public function setTotalAmount(float $totalAmount) : self |
484
|
|
|
{ |
485
|
|
|
$this->totalAmount = $totalAmount; |
486
|
|
|
return $this; |
487
|
|
|
} |
488
|
|
|
|
489
|
|
|
/** |
490
|
|
|
* @return string |
491
|
|
|
*/ |
492
|
|
|
public function getCallBackUrl() : string |
493
|
|
|
{ |
494
|
|
|
return $this->callBackUrl; |
495
|
|
|
} |
496
|
|
|
|
497
|
|
|
/** |
498
|
|
|
* @param string $callBackUrl |
499
|
|
|
* @return PaymentRequest |
500
|
|
|
*/ |
501
|
|
|
public function setCallBackUrl(string $callBackUrl) : self |
502
|
|
|
{ |
503
|
|
|
$this->callBackUrl = $callBackUrl; |
504
|
|
|
return $this; |
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* @return string |
509
|
|
|
*/ |
510
|
|
|
public function getFullCallBackOkUrl() : string |
511
|
|
|
{ |
512
|
|
|
return $this->fullCallBackOkUrl; |
513
|
|
|
} |
514
|
|
|
|
515
|
|
|
/** |
516
|
|
|
* @param string $fullCallBackOkUrl |
517
|
|
|
* @return PaymentRequest |
518
|
|
|
*/ |
519
|
|
|
public function setFullCallBackOkUrl(string $fullCallBackOkUrl) : self |
520
|
|
|
{ |
521
|
|
|
$this->fullCallBackOkUrl = $fullCallBackOkUrl; |
522
|
|
|
return $this; |
523
|
|
|
} |
524
|
|
|
|
525
|
|
|
/** |
526
|
|
|
* @return string |
527
|
|
|
*/ |
528
|
|
|
public function getCallBackOkUrl() : string |
529
|
|
|
{ |
530
|
|
|
return $this->callBackOkUrl; |
531
|
|
|
} |
532
|
|
|
|
533
|
|
|
/** |
534
|
|
|
* @param string $callBackOkUrl |
535
|
|
|
* @return PaymentRequest |
536
|
|
|
*/ |
537
|
|
|
public function setCallBackOkUrl(string $callBackOkUrl) : self |
538
|
|
|
{ |
539
|
|
|
$this->callBackOkUrl = $callBackOkUrl; |
540
|
|
|
return $this; |
541
|
|
|
} |
542
|
|
|
|
543
|
|
|
/** |
544
|
|
|
* @return string |
545
|
|
|
*/ |
546
|
|
|
public function getCallBackServerUrl() : string |
547
|
|
|
{ |
548
|
|
|
return $this->callBackServerUrl; |
549
|
|
|
} |
550
|
|
|
|
551
|
|
|
/** |
552
|
|
|
* @param string $callBackServerUrl |
553
|
|
|
* @return PaymentRequest |
554
|
|
|
*/ |
555
|
|
|
public function setCallBackServerUrl(string $callBackServerUrl) : self |
556
|
|
|
{ |
557
|
|
|
$this->callBackServerUrl = $callBackServerUrl; |
558
|
|
|
return $this; |
559
|
|
|
} |
560
|
|
|
|
561
|
|
|
/** |
562
|
|
|
* @return int |
563
|
|
|
*/ |
564
|
|
|
public function getLanguageId() : int |
565
|
|
|
{ |
566
|
|
|
return $this->languageId; |
567
|
|
|
} |
568
|
|
|
|
569
|
|
|
/** |
570
|
|
|
* @param int $languageId |
571
|
|
|
* @return PaymentRequest |
572
|
|
|
*/ |
573
|
|
|
public function setLanguageId(int $languageId) : self |
574
|
|
|
{ |
575
|
|
|
$this->languageId = $languageId; |
576
|
|
|
return $this; |
577
|
|
|
} |
578
|
|
|
|
579
|
|
|
/** |
580
|
|
|
* @return bool |
581
|
|
|
*/ |
582
|
|
|
public function isTestMode(): bool |
583
|
|
|
{ |
584
|
|
|
return $this->testMode; |
585
|
|
|
} |
586
|
|
|
|
587
|
|
|
/** |
588
|
|
|
* @param bool $testMode |
589
|
|
|
* @return PaymentRequest |
590
|
|
|
*/ |
591
|
|
|
public function setTestMode(bool $testMode) : self |
592
|
|
|
{ |
593
|
|
|
$this->testMode = $testMode; |
594
|
|
|
return $this; |
595
|
|
|
} |
596
|
|
|
|
597
|
|
|
/** |
598
|
|
|
* @return int |
599
|
|
|
*/ |
600
|
|
|
public function getPaymentGatewayCurrencyCode() |
601
|
|
|
{ |
602
|
|
|
return $this->paymentGatewayCurrencyCode; |
603
|
|
|
} |
604
|
|
|
|
605
|
|
|
/** |
606
|
|
|
* @param int $paymentGatewayCurrencyCode |
607
|
|
|
* @return PaymentRequest |
608
|
|
|
*/ |
609
|
|
|
public function setPaymentGatewayCurrencyCode(int $paymentGatewayCurrencyCode) : self |
610
|
|
|
{ |
611
|
|
|
$this->paymentGatewayCurrencyCode = $paymentGatewayCurrencyCode; |
612
|
|
|
return $this; |
613
|
|
|
} |
614
|
|
|
|
615
|
|
|
/** |
616
|
|
|
* @return int |
617
|
|
|
*/ |
618
|
|
|
public function getCardTypeId() |
619
|
|
|
{ |
620
|
|
|
return $this->cardTypeId; |
621
|
|
|
} |
622
|
|
|
|
623
|
|
|
/** |
624
|
|
|
* @param int $cardTypeId |
625
|
|
|
* @return PaymentRequest |
626
|
|
|
*/ |
627
|
|
|
public function setCardTypeId(int $cardTypeId) : self |
628
|
|
|
{ |
629
|
|
|
$this->cardTypeId = $cardTypeId; |
630
|
|
|
return $this; |
631
|
|
|
} |
632
|
|
|
|
633
|
|
|
/** |
634
|
|
|
* @return string |
635
|
|
|
*/ |
636
|
|
|
public function getCustomerRekvNr() : string |
637
|
|
|
{ |
638
|
|
|
return $this->customerRekvNr; |
639
|
|
|
} |
640
|
|
|
|
641
|
|
|
/** |
642
|
|
|
* @param string $customerRekvNr |
643
|
|
|
* @return PaymentRequest |
644
|
|
|
*/ |
645
|
|
|
public function setCustomerRekvNr(string $customerRekvNr) : self |
646
|
|
|
{ |
647
|
|
|
$this->customerRekvNr = $customerRekvNr; |
648
|
|
|
return $this; |
649
|
|
|
} |
650
|
|
|
|
651
|
|
|
/** |
652
|
|
|
* @return string |
653
|
|
|
*/ |
654
|
|
|
public function getCustomerName() : string |
655
|
|
|
{ |
656
|
|
|
return $this->customerName; |
657
|
|
|
} |
658
|
|
|
|
659
|
|
|
/** |
660
|
|
|
* @param string $customerName |
661
|
|
|
* @return PaymentRequest |
662
|
|
|
*/ |
663
|
|
|
public function setCustomerName(string $customerName) : self |
664
|
|
|
{ |
665
|
|
|
$this->customerName = $customerName; |
666
|
|
|
return $this; |
667
|
|
|
} |
668
|
|
|
|
669
|
|
|
/** |
670
|
|
|
* @return string |
671
|
|
|
*/ |
672
|
|
|
public function getCustomerCompany() : string |
673
|
|
|
{ |
674
|
|
|
return $this->customerCompany; |
675
|
|
|
} |
676
|
|
|
|
677
|
|
|
/** |
678
|
|
|
* @param string $customerCompany |
679
|
|
|
* @return PaymentRequest |
680
|
|
|
*/ |
681
|
|
|
public function setCustomerCompany(string $customerCompany) : self |
682
|
|
|
{ |
683
|
|
|
$this->customerCompany = $customerCompany; |
684
|
|
|
return $this; |
685
|
|
|
} |
686
|
|
|
|
687
|
|
|
/** |
688
|
|
|
* @return string |
689
|
|
|
*/ |
690
|
|
|
public function getCustomerAddress() : string |
691
|
|
|
{ |
692
|
|
|
return $this->customerAddress; |
693
|
|
|
} |
694
|
|
|
|
695
|
|
|
/** |
696
|
|
|
* @param string $customerAddress |
697
|
|
|
* @return PaymentRequest |
698
|
|
|
*/ |
699
|
|
|
public function setCustomerAddress(string $customerAddress) : self |
700
|
|
|
{ |
701
|
|
|
$this->customerAddress = $customerAddress; |
702
|
|
|
return $this; |
703
|
|
|
} |
704
|
|
|
|
705
|
|
|
/** |
706
|
|
|
* @return string |
707
|
|
|
*/ |
708
|
|
|
public function getCustomerAddress2() : string |
709
|
|
|
{ |
710
|
|
|
return $this->customerAddress2; |
711
|
|
|
} |
712
|
|
|
|
713
|
|
|
/** |
714
|
|
|
* @param string $customerAddress2 |
715
|
|
|
* @return PaymentRequest |
716
|
|
|
*/ |
717
|
|
|
public function setCustomerAddress2(string $customerAddress2) : self |
718
|
|
|
{ |
719
|
|
|
$this->customerAddress2 = $customerAddress2; |
720
|
|
|
return $this; |
721
|
|
|
} |
722
|
|
|
|
723
|
|
|
/** |
724
|
|
|
* @return string |
725
|
|
|
*/ |
726
|
|
|
public function getCustomerZipCode() : string |
727
|
|
|
{ |
728
|
|
|
return $this->customerZipCode; |
729
|
|
|
} |
730
|
|
|
|
731
|
|
|
/** |
732
|
|
|
* @param string $customerZipCode |
733
|
|
|
* @return PaymentRequest |
734
|
|
|
*/ |
735
|
|
|
public function setCustomerZipCode(string $customerZipCode) : self |
736
|
|
|
{ |
737
|
|
|
$this->customerZipCode = $customerZipCode; |
738
|
|
|
return $this; |
739
|
|
|
} |
740
|
|
|
|
741
|
|
|
/** |
742
|
|
|
* @return string |
743
|
|
|
*/ |
744
|
|
|
public function getCustomerCity() : string |
745
|
|
|
{ |
746
|
|
|
return $this->customerCity; |
747
|
|
|
} |
748
|
|
|
|
749
|
|
|
/** |
750
|
|
|
* @param string $customerCity |
751
|
|
|
* @return PaymentRequest |
752
|
|
|
*/ |
753
|
|
|
public function setCustomerCity(string $customerCity) : self |
754
|
|
|
{ |
755
|
|
|
$this->customerCity = $customerCity; |
756
|
|
|
return $this; |
757
|
|
|
} |
758
|
|
|
|
759
|
|
|
/** |
760
|
|
|
* @return int |
761
|
|
|
*/ |
762
|
|
|
public function getCustomerCountryId() |
763
|
|
|
{ |
764
|
|
|
return $this->customerCountryId; |
765
|
|
|
} |
766
|
|
|
|
767
|
|
|
/** |
768
|
|
|
* @param int $customerCountryId |
769
|
|
|
* @return PaymentRequest |
770
|
|
|
*/ |
771
|
|
|
public function setCustomerCountryId(int $customerCountryId) : self |
772
|
|
|
{ |
773
|
|
|
$this->customerCountryId = $customerCountryId; |
774
|
|
|
return $this; |
775
|
|
|
} |
776
|
|
|
|
777
|
|
|
/** |
778
|
|
|
* @return string |
779
|
|
|
*/ |
780
|
|
|
public function getCustomerCountry() : string |
781
|
|
|
{ |
782
|
|
|
return $this->customerCountry; |
783
|
|
|
} |
784
|
|
|
|
785
|
|
|
/** |
786
|
|
|
* @param string $customerCountry |
787
|
|
|
* @return PaymentRequest |
788
|
|
|
*/ |
789
|
|
|
public function setCustomerCountry(string $customerCountry) : self |
790
|
|
|
{ |
791
|
|
|
$this->customerCountry = $customerCountry; |
792
|
|
|
return $this; |
793
|
|
|
} |
794
|
|
|
|
795
|
|
|
/** |
796
|
|
|
* @return string |
797
|
|
|
*/ |
798
|
|
|
public function getCustomerPhone() : string |
799
|
|
|
{ |
800
|
|
|
return $this->customerPhone; |
801
|
|
|
} |
802
|
|
|
|
803
|
|
|
/** |
804
|
|
|
* @param string $customerPhone |
805
|
|
|
* @return PaymentRequest |
806
|
|
|
*/ |
807
|
|
|
public function setCustomerPhone(string $customerPhone) : self |
808
|
|
|
{ |
809
|
|
|
$this->customerPhone = $customerPhone; |
810
|
|
|
return $this; |
811
|
|
|
} |
812
|
|
|
|
813
|
|
|
/** |
814
|
|
|
* @return string |
815
|
|
|
*/ |
816
|
|
|
public function getCustomerFax() : string |
817
|
|
|
{ |
818
|
|
|
return $this->customerFax; |
819
|
|
|
} |
820
|
|
|
|
821
|
|
|
/** |
822
|
|
|
* @param string $customerFax |
823
|
|
|
* @return PaymentRequest |
824
|
|
|
*/ |
825
|
|
|
public function setCustomerFax(string $customerFax) : self |
826
|
|
|
{ |
827
|
|
|
$this->customerFax = $customerFax; |
828
|
|
|
return $this; |
829
|
|
|
} |
830
|
|
|
|
831
|
|
|
/** |
832
|
|
|
* @return string |
833
|
|
|
*/ |
834
|
|
|
public function getCustomerEmail() : string |
835
|
|
|
{ |
836
|
|
|
return $this->customerEmail; |
837
|
|
|
} |
838
|
|
|
|
839
|
|
|
/** |
840
|
|
|
* @param string $customerEmail |
841
|
|
|
* @return PaymentRequest |
842
|
|
|
*/ |
843
|
|
|
public function setCustomerEmail(string $customerEmail) : self |
844
|
|
|
{ |
845
|
|
|
$this->customerEmail = $customerEmail; |
846
|
|
|
return $this; |
847
|
|
|
} |
848
|
|
|
|
849
|
|
|
/** |
850
|
|
|
* @return string |
851
|
|
|
*/ |
852
|
|
|
public function getCustomerNote() : string |
853
|
|
|
{ |
854
|
|
|
return $this->customerNote; |
855
|
|
|
} |
856
|
|
|
|
857
|
|
|
/** |
858
|
|
|
* @param string $customerNote |
859
|
|
|
* @return PaymentRequest |
860
|
|
|
*/ |
861
|
|
|
public function setCustomerNote(string $customerNote) : self |
862
|
|
|
{ |
863
|
|
|
$this->customerNote = $customerNote; |
864
|
|
|
return $this; |
865
|
|
|
} |
866
|
|
|
|
867
|
|
|
/** |
868
|
|
|
* @return string |
869
|
|
|
*/ |
870
|
|
|
public function getCustomerCvrnr() : string |
871
|
|
|
{ |
872
|
|
|
return $this->customerCvrnr; |
873
|
|
|
} |
874
|
|
|
|
875
|
|
|
/** |
876
|
|
|
* @param string $customerCvrnr |
877
|
|
|
* @return PaymentRequest |
878
|
|
|
*/ |
879
|
|
|
public function setCustomerCvrnr(string $customerCvrnr) : self |
880
|
|
|
{ |
881
|
|
|
$this->customerCvrnr = $customerCvrnr; |
882
|
|
|
return $this; |
883
|
|
|
} |
884
|
|
|
|
885
|
|
|
/** |
886
|
|
|
* @return string |
887
|
|
|
*/ |
888
|
|
|
public function getCustomerCustTypeId() : string |
889
|
|
|
{ |
890
|
|
|
return $this->customerCustTypeId; |
891
|
|
|
} |
892
|
|
|
|
893
|
|
|
/** |
894
|
|
|
* @param int $customerCustTypeId |
895
|
|
|
* @return PaymentRequest |
896
|
|
|
*/ |
897
|
|
|
public function setCustomerCustTypeId(int $customerCustTypeId) : self |
898
|
|
|
{ |
899
|
|
|
$this->customerCustTypeId = $customerCustTypeId; |
|
|
|
|
900
|
|
|
return $this; |
901
|
|
|
} |
902
|
|
|
|
903
|
|
|
/** |
904
|
|
|
* @return string |
905
|
|
|
*/ |
906
|
|
|
public function getCustomerEan() : string |
907
|
|
|
{ |
908
|
|
|
return $this->customerEan; |
909
|
|
|
} |
910
|
|
|
|
911
|
|
|
/** |
912
|
|
|
* @param string $customerEan |
913
|
|
|
* @return PaymentRequest |
914
|
|
|
*/ |
915
|
|
|
public function setCustomerEan(string $customerEan) : self |
916
|
|
|
{ |
917
|
|
|
$this->customerEan = $customerEan; |
918
|
|
|
return $this; |
919
|
|
|
} |
920
|
|
|
|
921
|
|
|
/** |
922
|
|
|
* @return string |
923
|
|
|
*/ |
924
|
|
|
public function getCustomerRes1() : string |
925
|
|
|
{ |
926
|
|
|
return $this->customerRes1; |
927
|
|
|
} |
928
|
|
|
|
929
|
|
|
/** |
930
|
|
|
* @param string $customerRes1 |
931
|
|
|
* @return PaymentRequest |
932
|
|
|
*/ |
933
|
|
|
public function setCustomerRes1(string $customerRes1) : self |
934
|
|
|
{ |
935
|
|
|
$this->customerRes1 = $customerRes1; |
936
|
|
|
return $this; |
937
|
|
|
} |
938
|
|
|
|
939
|
|
|
/** |
940
|
|
|
* @return string |
941
|
|
|
*/ |
942
|
|
|
public function getCustomerRes2() : string |
943
|
|
|
{ |
944
|
|
|
return $this->customerRes2; |
945
|
|
|
} |
946
|
|
|
|
947
|
|
|
/** |
948
|
|
|
* @param string $customerRes2 |
949
|
|
|
* @return PaymentRequest |
950
|
|
|
*/ |
951
|
|
|
public function setCustomerRes2(string $customerRes2) : self |
952
|
|
|
{ |
953
|
|
|
$this->customerRes2 = $customerRes2; |
954
|
|
|
return $this; |
955
|
|
|
} |
956
|
|
|
|
957
|
|
|
/** |
958
|
|
|
* @return string |
959
|
|
|
*/ |
960
|
|
|
public function getCustomerRes3() : string |
961
|
|
|
{ |
962
|
|
|
return $this->customerRes3; |
963
|
|
|
} |
964
|
|
|
|
965
|
|
|
/** |
966
|
|
|
* @param string $customerRes3 |
967
|
|
|
* @return PaymentRequest |
968
|
|
|
*/ |
969
|
|
|
public function setCustomerRes3(string $customerRes3) : self |
970
|
|
|
{ |
971
|
|
|
$this->customerRes3 = $customerRes3; |
972
|
|
|
return $this; |
973
|
|
|
} |
974
|
|
|
|
975
|
|
|
/** |
976
|
|
|
* @return string |
977
|
|
|
*/ |
978
|
|
|
public function getCustomerRes4() : string |
979
|
|
|
{ |
980
|
|
|
return $this->customerRes4; |
981
|
|
|
} |
982
|
|
|
|
983
|
|
|
/** |
984
|
|
|
* @param string $customerRes4 |
985
|
|
|
* @return PaymentRequest |
986
|
|
|
*/ |
987
|
|
|
public function setCustomerRes4(string $customerRes4) : self |
988
|
|
|
{ |
989
|
|
|
$this->customerRes4 = $customerRes4; |
990
|
|
|
return $this; |
991
|
|
|
} |
992
|
|
|
|
993
|
|
|
/** |
994
|
|
|
* @return string |
995
|
|
|
*/ |
996
|
|
|
public function getCustomerRes5() : string |
997
|
|
|
{ |
998
|
|
|
return $this->customerRes5; |
999
|
|
|
} |
1000
|
|
|
|
1001
|
|
|
/** |
1002
|
|
|
* @param string $customerRes5 |
1003
|
|
|
* @return PaymentRequest |
1004
|
|
|
*/ |
1005
|
|
|
public function setCustomerRes5(string $customerRes5) : self |
1006
|
|
|
{ |
1007
|
|
|
$this->customerRes5 = $customerRes5; |
1008
|
|
|
return $this; |
1009
|
|
|
} |
1010
|
|
|
|
1011
|
|
|
/** |
1012
|
|
|
* @return string |
1013
|
|
|
*/ |
1014
|
|
|
public function getCustomerIp() : string |
1015
|
|
|
{ |
1016
|
|
|
return $this->customerIp; |
1017
|
|
|
} |
1018
|
|
|
|
1019
|
|
|
/** |
1020
|
|
|
* @param string $customerIp |
1021
|
|
|
* @return PaymentRequest |
1022
|
|
|
*/ |
1023
|
|
|
public function setCustomerIp(string $customerIp) : self |
1024
|
|
|
{ |
1025
|
|
|
$this->customerIp = $customerIp; |
1026
|
|
|
return $this; |
1027
|
|
|
} |
1028
|
|
|
|
1029
|
|
|
/** |
1030
|
|
|
* @return string |
1031
|
|
|
*/ |
1032
|
|
|
public function getDeliveryName() : string |
1033
|
|
|
{ |
1034
|
|
|
return $this->deliveryName; |
1035
|
|
|
} |
1036
|
|
|
|
1037
|
|
|
/** |
1038
|
|
|
* @param string $deliveryName |
1039
|
|
|
* @return PaymentRequest |
1040
|
|
|
*/ |
1041
|
|
|
public function setDeliveryName(string $deliveryName) : self |
1042
|
|
|
{ |
1043
|
|
|
$this->deliveryName = $deliveryName; |
1044
|
|
|
return $this; |
1045
|
|
|
} |
1046
|
|
|
|
1047
|
|
|
/** |
1048
|
|
|
* @return string |
1049
|
|
|
*/ |
1050
|
|
|
public function getDeliveryCompany() : string |
1051
|
|
|
{ |
1052
|
|
|
return $this->deliveryCompany; |
1053
|
|
|
} |
1054
|
|
|
|
1055
|
|
|
/** |
1056
|
|
|
* @param string $deliveryCompany |
1057
|
|
|
* @return PaymentRequest |
1058
|
|
|
*/ |
1059
|
|
|
public function setDeliveryCompany(string $deliveryCompany) : self |
1060
|
|
|
{ |
1061
|
|
|
$this->deliveryCompany = $deliveryCompany; |
1062
|
|
|
return $this; |
1063
|
|
|
} |
1064
|
|
|
|
1065
|
|
|
/** |
1066
|
|
|
* @return string |
1067
|
|
|
*/ |
1068
|
|
|
public function getDeliveryAddress() : string |
1069
|
|
|
{ |
1070
|
|
|
return $this->deliveryAddress; |
1071
|
|
|
} |
1072
|
|
|
|
1073
|
|
|
/** |
1074
|
|
|
* @param string $deliveryAddress |
1075
|
|
|
* @return PaymentRequest |
1076
|
|
|
*/ |
1077
|
|
|
public function setDeliveryAddress(string $deliveryAddress) : self |
1078
|
|
|
{ |
1079
|
|
|
$this->deliveryAddress = $deliveryAddress; |
1080
|
|
|
return $this; |
1081
|
|
|
} |
1082
|
|
|
|
1083
|
|
|
/** |
1084
|
|
|
* @return string |
1085
|
|
|
*/ |
1086
|
|
|
public function getDeliveryAddress2() : string |
1087
|
|
|
{ |
1088
|
|
|
return $this->deliveryAddress2; |
1089
|
|
|
} |
1090
|
|
|
|
1091
|
|
|
/** |
1092
|
|
|
* @param string $deliveryAddress2 |
1093
|
|
|
* @return PaymentRequest |
1094
|
|
|
*/ |
1095
|
|
|
public function setDeliveryAddress2(string $deliveryAddress2) : self |
1096
|
|
|
{ |
1097
|
|
|
$this->deliveryAddress2 = $deliveryAddress2; |
1098
|
|
|
return $this; |
1099
|
|
|
} |
1100
|
|
|
|
1101
|
|
|
/** |
1102
|
|
|
* @return string |
1103
|
|
|
*/ |
1104
|
|
|
public function getDeliveryZipCode() : string |
1105
|
|
|
{ |
1106
|
|
|
return $this->deliveryZipCode; |
1107
|
|
|
} |
1108
|
|
|
|
1109
|
|
|
/** |
1110
|
|
|
* @param string $deliveryZipCode |
1111
|
|
|
* @return PaymentRequest |
1112
|
|
|
*/ |
1113
|
|
|
public function setDeliveryZipCode(string $deliveryZipCode) : self |
1114
|
|
|
{ |
1115
|
|
|
$this->deliveryZipCode = $deliveryZipCode; |
1116
|
|
|
return $this; |
1117
|
|
|
} |
1118
|
|
|
|
1119
|
|
|
/** |
1120
|
|
|
* @return string |
1121
|
|
|
*/ |
1122
|
|
|
public function getDeliveryCity() : string |
1123
|
|
|
{ |
1124
|
|
|
return $this->deliveryCity; |
1125
|
|
|
} |
1126
|
|
|
|
1127
|
|
|
/** |
1128
|
|
|
* @param string $deliveryCity |
1129
|
|
|
* @return PaymentRequest |
1130
|
|
|
*/ |
1131
|
|
|
public function setDeliveryCity(string $deliveryCity) : self |
1132
|
|
|
{ |
1133
|
|
|
$this->deliveryCity = $deliveryCity; |
1134
|
|
|
return $this; |
1135
|
|
|
} |
1136
|
|
|
|
1137
|
|
|
/** |
1138
|
|
|
* @return int |
1139
|
|
|
*/ |
1140
|
|
|
public function getDeliveryCountryID() |
1141
|
|
|
{ |
1142
|
|
|
return $this->deliveryCountryID; |
1143
|
|
|
} |
1144
|
|
|
|
1145
|
|
|
/** |
1146
|
|
|
* @param int $deliveryCountryID |
1147
|
|
|
* @return PaymentRequest |
1148
|
|
|
*/ |
1149
|
|
|
public function setDeliveryCountryID(int $deliveryCountryID) : self |
1150
|
|
|
{ |
1151
|
|
|
$this->deliveryCountryID = $deliveryCountryID; |
1152
|
|
|
return $this; |
1153
|
|
|
} |
1154
|
|
|
|
1155
|
|
|
/** |
1156
|
|
|
* @return string |
1157
|
|
|
*/ |
1158
|
|
|
public function getDeliveryCountry() : string |
1159
|
|
|
{ |
1160
|
|
|
return $this->deliveryCountry; |
1161
|
|
|
} |
1162
|
|
|
|
1163
|
|
|
/** |
1164
|
|
|
* @param string $deliveryCountry |
1165
|
|
|
* @return PaymentRequest |
1166
|
|
|
*/ |
1167
|
|
|
public function setDeliveryCountry(string $deliveryCountry) : self |
1168
|
|
|
{ |
1169
|
|
|
$this->deliveryCountry = $deliveryCountry; |
1170
|
|
|
return $this; |
1171
|
|
|
} |
1172
|
|
|
|
1173
|
|
|
/** |
1174
|
|
|
* @return string |
1175
|
|
|
*/ |
1176
|
|
|
public function getDeliveryPhone() : string |
1177
|
|
|
{ |
1178
|
|
|
return $this->deliveryPhone; |
1179
|
|
|
} |
1180
|
|
|
|
1181
|
|
|
/** |
1182
|
|
|
* @param string $deliveryPhone |
1183
|
|
|
* @return PaymentRequest |
1184
|
|
|
*/ |
1185
|
|
|
public function setDeliveryPhone(string $deliveryPhone) : self |
1186
|
|
|
{ |
1187
|
|
|
$this->deliveryPhone = $deliveryPhone; |
1188
|
|
|
return $this; |
1189
|
|
|
} |
1190
|
|
|
|
1191
|
|
|
/** |
1192
|
|
|
* @return string |
1193
|
|
|
*/ |
1194
|
|
|
public function getDeliveryFax() : string |
1195
|
|
|
{ |
1196
|
|
|
return $this->deliveryFax; |
1197
|
|
|
} |
1198
|
|
|
|
1199
|
|
|
/** |
1200
|
|
|
* @param string $deliveryFax |
1201
|
|
|
* @return PaymentRequest |
1202
|
|
|
*/ |
1203
|
|
|
public function setDeliveryFax(string $deliveryFax) : self |
1204
|
|
|
{ |
1205
|
|
|
$this->deliveryFax = $deliveryFax; |
1206
|
|
|
return $this; |
1207
|
|
|
} |
1208
|
|
|
|
1209
|
|
|
/** |
1210
|
|
|
* @return string |
1211
|
|
|
*/ |
1212
|
|
|
public function getDeliveryEmail() : string |
1213
|
|
|
{ |
1214
|
|
|
return $this->deliveryEmail; |
1215
|
|
|
} |
1216
|
|
|
|
1217
|
|
|
/** |
1218
|
|
|
* @param string $deliveryEmail |
1219
|
|
|
* @return PaymentRequest |
1220
|
|
|
*/ |
1221
|
|
|
public function setDeliveryEmail(string $deliveryEmail) : self |
1222
|
|
|
{ |
1223
|
|
|
$this->deliveryEmail = $deliveryEmail; |
1224
|
|
|
return $this; |
1225
|
|
|
} |
1226
|
|
|
|
1227
|
|
|
/** |
1228
|
|
|
* @return string |
1229
|
|
|
*/ |
1230
|
|
|
public function getDeliveryEan() : string |
1231
|
|
|
{ |
1232
|
|
|
return $this->deliveryEan; |
1233
|
|
|
} |
1234
|
|
|
|
1235
|
|
|
/** |
1236
|
|
|
* @param string $deliveryEan |
1237
|
|
|
* @return PaymentRequest |
1238
|
|
|
*/ |
1239
|
|
|
public function setDeliveryEan(string $deliveryEan) : self |
1240
|
|
|
{ |
1241
|
|
|
$this->deliveryEan = $deliveryEan; |
1242
|
|
|
return $this; |
1243
|
|
|
} |
1244
|
|
|
|
1245
|
|
|
/** |
1246
|
|
|
* @return string |
1247
|
|
|
*/ |
1248
|
|
|
public function getShippingMethod() : string |
1249
|
|
|
{ |
1250
|
|
|
return $this->shippingMethod; |
1251
|
|
|
} |
1252
|
|
|
|
1253
|
|
|
/** |
1254
|
|
|
* @param string $shippingMethod |
1255
|
|
|
* @return PaymentRequest |
1256
|
|
|
*/ |
1257
|
|
|
public function setShippingMethod(string $shippingMethod) : self |
1258
|
|
|
{ |
1259
|
|
|
$this->shippingMethod = $shippingMethod; |
1260
|
|
|
return $this; |
1261
|
|
|
} |
1262
|
|
|
|
1263
|
|
|
/** |
1264
|
|
|
* @return float |
1265
|
|
|
*/ |
1266
|
|
|
public function getShippingFee() : float |
1267
|
|
|
{ |
1268
|
|
|
return $this->shippingFee; |
1269
|
|
|
} |
1270
|
|
|
|
1271
|
|
|
/** |
1272
|
|
|
* @param float $shippingFee |
1273
|
|
|
* @return PaymentRequest |
1274
|
|
|
*/ |
1275
|
|
|
public function setShippingFee(float $shippingFee) : self |
1276
|
|
|
{ |
1277
|
|
|
$this->shippingFee = $shippingFee; |
1278
|
|
|
return $this; |
1279
|
|
|
} |
1280
|
|
|
|
1281
|
|
|
/** |
1282
|
|
|
* @return string |
1283
|
|
|
*/ |
1284
|
|
|
public function getPaymentMethod() : string |
1285
|
|
|
{ |
1286
|
|
|
return $this->paymentMethod; |
1287
|
|
|
} |
1288
|
|
|
|
1289
|
|
|
/** |
1290
|
|
|
* @param string $paymentMethod |
1291
|
|
|
* @return PaymentRequest |
1292
|
|
|
*/ |
1293
|
|
|
public function setPaymentMethod(string $paymentMethod) : self |
1294
|
|
|
{ |
1295
|
|
|
$this->paymentMethod = $paymentMethod; |
1296
|
|
|
return $this; |
1297
|
|
|
} |
1298
|
|
|
|
1299
|
|
|
/** |
1300
|
|
|
* @return float |
1301
|
|
|
*/ |
1302
|
|
|
public function getPaymentFee() : float |
1303
|
|
|
{ |
1304
|
|
|
return $this->paymentFee; |
1305
|
|
|
} |
1306
|
|
|
|
1307
|
|
|
/** |
1308
|
|
|
* @param float $paymentFee |
1309
|
|
|
* @return PaymentRequest |
1310
|
|
|
*/ |
1311
|
|
|
public function setPaymentFee(float $paymentFee) : self |
1312
|
|
|
{ |
1313
|
|
|
$this->paymentFee = $paymentFee; |
1314
|
|
|
return $this; |
1315
|
|
|
} |
1316
|
|
|
|
1317
|
|
|
/** |
1318
|
|
|
* @return string |
1319
|
|
|
*/ |
1320
|
|
|
public function getLoadBalancerRealIp() : string |
1321
|
|
|
{ |
1322
|
|
|
return $this->loadBalancerRealIp; |
1323
|
|
|
} |
1324
|
|
|
|
1325
|
|
|
/** |
1326
|
|
|
* @param string $loadBalancerRealIp |
1327
|
|
|
* @return PaymentRequest |
1328
|
|
|
*/ |
1329
|
|
|
public function setLoadBalancerRealIp(string $loadBalancerRealIp) : self |
1330
|
|
|
{ |
1331
|
|
|
$this->loadBalancerRealIp = $loadBalancerRealIp; |
1332
|
|
|
return $this; |
1333
|
|
|
} |
1334
|
|
|
|
1335
|
|
|
/** |
1336
|
|
|
* @return OrderLine[] |
1337
|
|
|
*/ |
1338
|
|
|
public function getOrderLines() : array |
1339
|
|
|
{ |
1340
|
|
|
return $this->orderLines; |
1341
|
|
|
} |
1342
|
|
|
|
1343
|
|
|
/** |
1344
|
|
|
* @param OrderLine[] $orderLines |
1345
|
|
|
* @return PaymentRequest |
1346
|
|
|
*/ |
1347
|
|
|
public function setOrderLines(array $orderLines) : self |
1348
|
|
|
{ |
1349
|
|
|
$this->orderLines = $orderLines; |
1350
|
|
|
return $this; |
1351
|
|
|
} |
1352
|
|
|
|
1353
|
|
|
/** |
1354
|
|
|
* @param OrderLine $orderLine |
1355
|
|
|
* @return PaymentRequest |
1356
|
|
|
*/ |
1357
|
|
|
public function addOrderLine(OrderLine $orderLine) : self |
1358
|
|
|
{ |
1359
|
|
|
$this->orderLines[] = $orderLine; |
1360
|
|
|
return $this; |
1361
|
|
|
} |
1362
|
|
|
} |
1363
|
|
|
|
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.