|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Payone\Business\Api\Request\Container; |
|
9
|
|
|
|
|
10
|
|
|
abstract class AbstractRequestContainer extends AbstractContainer |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* @var int merchant id |
|
14
|
|
|
*/ |
|
15
|
|
|
protected $mid; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @var int |
|
19
|
|
|
*/ |
|
20
|
|
|
protected $aid; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @var int payment portal id |
|
24
|
|
|
*/ |
|
25
|
|
|
protected $portalid; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @var string payment portal id as md5 |
|
29
|
|
|
*/ |
|
30
|
|
|
protected $key; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @var string version of the the payone api defaults to 3.8 |
|
34
|
|
|
*/ |
|
35
|
|
|
protected $api_version; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @var string test or live mode |
|
39
|
|
|
*/ |
|
40
|
|
|
protected $mode; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @var string payone query name (e.g. preauthorization, authorization...) |
|
44
|
|
|
*/ |
|
45
|
|
|
protected $request; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @var string encoding (ISO 8859-1 or UTF-8) |
|
49
|
|
|
*/ |
|
50
|
|
|
protected $encoding; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* name of the solution-partner (company) |
|
54
|
|
|
* |
|
55
|
|
|
* @var string |
|
56
|
|
|
*/ |
|
57
|
|
|
protected $solution_name; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* version of the solution-partner's app / extension / plugin / etc.. |
|
61
|
|
|
* |
|
62
|
|
|
* @var string |
|
63
|
|
|
*/ |
|
64
|
|
|
protected $solution_version; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* system-name |
|
68
|
|
|
* |
|
69
|
|
|
* @var string |
|
70
|
|
|
*/ |
|
71
|
|
|
protected $integrator_name; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* system-version |
|
75
|
|
|
* |
|
76
|
|
|
* @var string |
|
77
|
|
|
*/ |
|
78
|
|
|
protected $integrator_version; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* @var string |
|
82
|
|
|
*/ |
|
83
|
|
|
protected $language; |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @var string |
|
87
|
|
|
*/ |
|
88
|
|
|
protected $hash; |
|
89
|
|
|
|
|
90
|
|
|
/** |
|
91
|
|
|
* @var string |
|
92
|
|
|
*/ |
|
93
|
|
|
protected $responsetype; |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @var array |
|
97
|
|
|
*/ |
|
98
|
|
|
protected $it; |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* @var array |
|
102
|
|
|
*/ |
|
103
|
|
|
protected $id; |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @var array |
|
107
|
|
|
*/ |
|
108
|
|
|
protected $pr; |
|
109
|
|
|
|
|
110
|
|
|
/** |
|
111
|
|
|
* @var array |
|
112
|
|
|
*/ |
|
113
|
|
|
protected $no; |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @var array |
|
117
|
|
|
*/ |
|
118
|
|
|
protected $de; |
|
119
|
|
|
|
|
120
|
|
|
/** |
|
121
|
|
|
* @var array |
|
122
|
|
|
*/ |
|
123
|
|
|
protected $va; |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* @var string |
|
127
|
|
|
*/ |
|
128
|
|
|
protected $email; |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* @param string $encoding |
|
132
|
|
|
* |
|
133
|
|
|
* @return $this |
|
134
|
|
|
*/ |
|
135
|
|
|
public function setEncoding($encoding) |
|
136
|
|
|
{ |
|
137
|
|
|
$this->encoding = $encoding; |
|
138
|
|
|
|
|
139
|
|
|
return $this; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* @return string |
|
144
|
|
|
*/ |
|
145
|
|
|
public function getEncoding() |
|
146
|
|
|
{ |
|
147
|
|
|
return $this->encoding; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* @param string $key |
|
152
|
|
|
* |
|
153
|
|
|
* @return $this |
|
154
|
|
|
*/ |
|
155
|
|
|
public function setKey($key) |
|
156
|
|
|
{ |
|
157
|
|
|
$this->key = $key; |
|
158
|
|
|
|
|
159
|
|
|
return $this; |
|
160
|
|
|
} |
|
161
|
|
|
|
|
162
|
|
|
/** |
|
163
|
|
|
* @return string |
|
164
|
|
|
*/ |
|
165
|
|
|
public function getKey() |
|
166
|
|
|
{ |
|
167
|
|
|
return $this->key; |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
/** |
|
171
|
|
|
* @param string $api_version |
|
172
|
|
|
* |
|
173
|
|
|
* @return $this |
|
174
|
|
|
*/ |
|
175
|
|
|
public function setApiVersion($api_version) |
|
176
|
|
|
{ |
|
177
|
|
|
$this->api_version = $api_version; |
|
178
|
|
|
|
|
179
|
|
|
return $this; |
|
180
|
|
|
} |
|
181
|
|
|
|
|
182
|
|
|
/** |
|
183
|
|
|
* @return string |
|
184
|
|
|
*/ |
|
185
|
|
|
public function getApiVersion() |
|
186
|
|
|
{ |
|
187
|
|
|
return $this->api_version; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
/** |
|
191
|
|
|
* @param int $mid |
|
192
|
|
|
* |
|
193
|
|
|
* @return $this |
|
194
|
|
|
*/ |
|
195
|
|
|
public function setMid($mid) |
|
196
|
|
|
{ |
|
197
|
|
|
$this->mid = $mid; |
|
198
|
|
|
|
|
199
|
|
|
return $this; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
/** |
|
203
|
|
|
* @return int |
|
204
|
|
|
*/ |
|
205
|
|
|
public function getMid() |
|
206
|
|
|
{ |
|
207
|
|
|
return $this->mid; |
|
208
|
|
|
} |
|
209
|
|
|
|
|
210
|
|
|
/** |
|
211
|
|
|
* @param string $mode |
|
212
|
|
|
* |
|
213
|
|
|
* @return $this |
|
214
|
|
|
*/ |
|
215
|
|
|
public function setMode($mode) |
|
216
|
|
|
{ |
|
217
|
|
|
$this->mode = $mode; |
|
218
|
|
|
|
|
219
|
|
|
return $this; |
|
220
|
|
|
} |
|
221
|
|
|
|
|
222
|
|
|
/** |
|
223
|
|
|
* @return string |
|
224
|
|
|
*/ |
|
225
|
|
|
public function getMode() |
|
226
|
|
|
{ |
|
227
|
|
|
return $this->mode; |
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
/** |
|
231
|
|
|
* @param int $portalid |
|
232
|
|
|
* |
|
233
|
|
|
* @return $this |
|
234
|
|
|
*/ |
|
235
|
|
|
public function setPortalid($portalid) |
|
236
|
|
|
{ |
|
237
|
|
|
$this->portalid = $portalid; |
|
238
|
|
|
|
|
239
|
|
|
return $this; |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* @return int |
|
244
|
|
|
*/ |
|
245
|
|
|
public function getPortalid() |
|
246
|
|
|
{ |
|
247
|
|
|
return $this->portalid; |
|
248
|
|
|
} |
|
249
|
|
|
|
|
250
|
|
|
/** |
|
251
|
|
|
* @param string $request |
|
252
|
|
|
* |
|
253
|
|
|
* @return $this |
|
254
|
|
|
*/ |
|
255
|
|
|
public function setRequest($request) |
|
256
|
|
|
{ |
|
257
|
|
|
$this->request = $request; |
|
258
|
|
|
|
|
259
|
|
|
return $this; |
|
260
|
|
|
} |
|
261
|
|
|
|
|
262
|
|
|
/** |
|
263
|
|
|
* @return string |
|
264
|
|
|
*/ |
|
265
|
|
|
public function getRequest() |
|
266
|
|
|
{ |
|
267
|
|
|
return $this->request; |
|
268
|
|
|
} |
|
269
|
|
|
|
|
270
|
|
|
/** |
|
271
|
|
|
* set the system-Name |
|
272
|
|
|
* |
|
273
|
|
|
* @param string $integrator_name |
|
274
|
|
|
* |
|
275
|
|
|
* @return $this |
|
276
|
|
|
*/ |
|
277
|
|
|
public function setIntegratorName($integrator_name) |
|
278
|
|
|
{ |
|
279
|
|
|
$this->integrator_name = $integrator_name; |
|
280
|
|
|
|
|
281
|
|
|
return $this; |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
/** |
|
285
|
|
|
* @return string |
|
286
|
|
|
*/ |
|
287
|
|
|
public function getIntegratorName() |
|
288
|
|
|
{ |
|
289
|
|
|
return $this->integrator_name; |
|
290
|
|
|
} |
|
291
|
|
|
|
|
292
|
|
|
/** |
|
293
|
|
|
* set the system-version |
|
294
|
|
|
* |
|
295
|
|
|
* @param string $integrator_version |
|
296
|
|
|
* |
|
297
|
|
|
* @return $this |
|
298
|
|
|
*/ |
|
299
|
|
|
public function setIntegratorVersion($integrator_version) |
|
300
|
|
|
{ |
|
301
|
|
|
$this->integrator_version = $integrator_version; |
|
302
|
|
|
|
|
303
|
|
|
return $this; |
|
304
|
|
|
} |
|
305
|
|
|
|
|
306
|
|
|
/** |
|
307
|
|
|
* @return string |
|
308
|
|
|
*/ |
|
309
|
|
|
public function getIntegratorVersion() |
|
310
|
|
|
{ |
|
311
|
|
|
return $this->integrator_version; |
|
312
|
|
|
} |
|
313
|
|
|
|
|
314
|
|
|
/** |
|
315
|
|
|
* set the name of the solution-partner (company) |
|
316
|
|
|
* |
|
317
|
|
|
* @param string $solution_name |
|
318
|
|
|
* |
|
319
|
|
|
* @return $this |
|
320
|
|
|
*/ |
|
321
|
|
|
public function setSolutionName($solution_name) |
|
322
|
|
|
{ |
|
323
|
|
|
$this->solution_name = $solution_name; |
|
324
|
|
|
|
|
325
|
|
|
return $this; |
|
326
|
|
|
} |
|
327
|
|
|
|
|
328
|
|
|
/** |
|
329
|
|
|
* @return string |
|
330
|
|
|
*/ |
|
331
|
|
|
public function getSolutionName() |
|
332
|
|
|
{ |
|
333
|
|
|
return $this->solution_name; |
|
334
|
|
|
} |
|
335
|
|
|
|
|
336
|
|
|
/** |
|
337
|
|
|
* set the version of the solution-partner's app / extension / plugin / etc.. |
|
338
|
|
|
* |
|
339
|
|
|
* @param string $solution_version |
|
340
|
|
|
* |
|
341
|
|
|
* @return $this |
|
342
|
|
|
*/ |
|
343
|
|
|
public function setSolutionVersion($solution_version) |
|
344
|
|
|
{ |
|
345
|
|
|
$this->solution_version = $solution_version; |
|
346
|
|
|
|
|
347
|
|
|
return $this; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
/** |
|
351
|
|
|
* @return string |
|
352
|
|
|
*/ |
|
353
|
|
|
public function getSolutionVersion() |
|
354
|
|
|
{ |
|
355
|
|
|
return $this->solution_version; |
|
356
|
|
|
} |
|
357
|
|
|
|
|
358
|
|
|
/** |
|
359
|
|
|
* @return int |
|
360
|
|
|
*/ |
|
361
|
|
|
public function getAid() |
|
362
|
|
|
{ |
|
363
|
|
|
return $this->aid; |
|
364
|
|
|
} |
|
365
|
|
|
|
|
366
|
|
|
/** |
|
367
|
|
|
* @param int $aid |
|
368
|
|
|
* |
|
369
|
|
|
* @return $this |
|
370
|
|
|
*/ |
|
371
|
|
|
public function setAid($aid) |
|
372
|
|
|
{ |
|
373
|
|
|
$this->aid = $aid; |
|
374
|
|
|
|
|
375
|
|
|
return $this; |
|
376
|
|
|
} |
|
377
|
|
|
|
|
378
|
|
|
/** |
|
379
|
|
|
* @return string |
|
380
|
|
|
*/ |
|
381
|
|
|
public function getLanguage() |
|
382
|
|
|
{ |
|
383
|
|
|
return $this->language; |
|
384
|
|
|
} |
|
385
|
|
|
|
|
386
|
|
|
/** |
|
387
|
|
|
* @param string $language |
|
388
|
|
|
* |
|
389
|
|
|
* @return $this |
|
390
|
|
|
*/ |
|
391
|
|
|
public function setLanguage($language) |
|
392
|
|
|
{ |
|
393
|
|
|
$this->language = $language; |
|
394
|
|
|
|
|
395
|
|
|
return $this; |
|
396
|
|
|
} |
|
397
|
|
|
|
|
398
|
|
|
/** |
|
399
|
|
|
* @param string $hash |
|
400
|
|
|
* |
|
401
|
|
|
* @return $this |
|
402
|
|
|
*/ |
|
403
|
|
|
public function setHash($hash) |
|
404
|
|
|
{ |
|
405
|
|
|
$this->hash = $hash; |
|
406
|
|
|
|
|
407
|
|
|
return $this; |
|
408
|
|
|
} |
|
409
|
|
|
|
|
410
|
|
|
/** |
|
411
|
|
|
* @return string |
|
412
|
|
|
*/ |
|
413
|
|
|
public function getHash() |
|
414
|
|
|
{ |
|
415
|
|
|
return $this->hash; |
|
416
|
|
|
} |
|
417
|
|
|
|
|
418
|
|
|
/** |
|
419
|
|
|
* @return string |
|
420
|
|
|
*/ |
|
421
|
|
|
public function getResponsetype() |
|
422
|
|
|
{ |
|
423
|
|
|
return $this->responsetype; |
|
424
|
|
|
} |
|
425
|
|
|
|
|
426
|
|
|
/** |
|
427
|
|
|
* @param string $responsetype |
|
428
|
|
|
* |
|
429
|
|
|
* @return $this |
|
430
|
|
|
*/ |
|
431
|
|
|
public function setResponsetype($responsetype) |
|
432
|
|
|
{ |
|
433
|
|
|
$this->responsetype = $responsetype; |
|
434
|
|
|
|
|
435
|
|
|
return $this; |
|
436
|
|
|
} |
|
437
|
|
|
|
|
438
|
|
|
/** |
|
439
|
|
|
* @return array |
|
440
|
|
|
*/ |
|
441
|
|
|
public function getIt(): array |
|
442
|
|
|
{ |
|
443
|
|
|
return $this->it; |
|
444
|
|
|
} |
|
445
|
|
|
|
|
446
|
|
|
/** |
|
447
|
|
|
* @param array $it |
|
448
|
|
|
*/ |
|
449
|
|
|
public function setIt(array $it): void |
|
450
|
|
|
{ |
|
451
|
|
|
$this->it = $it; |
|
452
|
|
|
} |
|
453
|
|
|
|
|
454
|
|
|
/** |
|
455
|
|
|
* @return array |
|
456
|
|
|
*/ |
|
457
|
|
|
public function getId(): array |
|
458
|
|
|
{ |
|
459
|
|
|
return $this->id; |
|
460
|
|
|
} |
|
461
|
|
|
|
|
462
|
|
|
/** |
|
463
|
|
|
* @param array $id |
|
464
|
|
|
*/ |
|
465
|
|
|
public function setId(array $id): void |
|
466
|
|
|
{ |
|
467
|
|
|
$this->id = $id; |
|
468
|
|
|
} |
|
469
|
|
|
|
|
470
|
|
|
/** |
|
471
|
|
|
* @return array |
|
472
|
|
|
*/ |
|
473
|
|
|
public function getPr(): array |
|
474
|
|
|
{ |
|
475
|
|
|
return $this->pr; |
|
476
|
|
|
} |
|
477
|
|
|
|
|
478
|
|
|
/** |
|
479
|
|
|
* @param array $pr |
|
480
|
|
|
*/ |
|
481
|
|
|
public function setPr(array $pr): void |
|
482
|
|
|
{ |
|
483
|
|
|
$this->pr = $pr; |
|
484
|
|
|
} |
|
485
|
|
|
|
|
486
|
|
|
/** |
|
487
|
|
|
* @return array |
|
488
|
|
|
*/ |
|
489
|
|
|
public function getNo(): array |
|
490
|
|
|
{ |
|
491
|
|
|
return $this->no; |
|
492
|
|
|
} |
|
493
|
|
|
|
|
494
|
|
|
/** |
|
495
|
|
|
* @param array $no |
|
496
|
|
|
*/ |
|
497
|
|
|
public function setNo(array $no): void |
|
498
|
|
|
{ |
|
499
|
|
|
$this->no = $no; |
|
500
|
|
|
} |
|
501
|
|
|
|
|
502
|
|
|
/** |
|
503
|
|
|
* @return array |
|
504
|
|
|
*/ |
|
505
|
|
|
public function getDe(): array |
|
506
|
|
|
{ |
|
507
|
|
|
return $this->de; |
|
508
|
|
|
} |
|
509
|
|
|
|
|
510
|
|
|
/** |
|
511
|
|
|
* @param array $de |
|
512
|
|
|
*/ |
|
513
|
|
|
public function setDe(array $de): void |
|
514
|
|
|
{ |
|
515
|
|
|
$this->de = $de; |
|
516
|
|
|
} |
|
517
|
|
|
|
|
518
|
|
|
/** |
|
519
|
|
|
* @return array |
|
520
|
|
|
*/ |
|
521
|
|
|
public function getVa(): array |
|
522
|
|
|
{ |
|
523
|
|
|
return $this->va; |
|
524
|
|
|
} |
|
525
|
|
|
|
|
526
|
|
|
/** |
|
527
|
|
|
* @param array $va |
|
528
|
|
|
*/ |
|
529
|
|
|
public function setVa(array $va): void |
|
530
|
|
|
{ |
|
531
|
|
|
$this->va = $va; |
|
532
|
|
|
} |
|
533
|
|
|
|
|
534
|
|
|
/** |
|
535
|
|
|
* @return string |
|
536
|
|
|
*/ |
|
537
|
|
|
public function getEmail(): string |
|
538
|
|
|
{ |
|
539
|
|
|
return $this->email; |
|
540
|
|
|
} |
|
541
|
|
|
|
|
542
|
|
|
/** |
|
543
|
|
|
* @param string $email |
|
544
|
|
|
*/ |
|
545
|
|
|
public function setEmail(string $email): void |
|
546
|
|
|
{ |
|
547
|
|
|
$this->email = $email; |
|
548
|
|
|
} |
|
549
|
|
|
} |
|
550
|
|
|
|