Complex classes like Payment often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Payment, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
25 | class Payment extends BasePayment |
||
26 | { |
||
27 | /** |
||
28 | * @var int |
||
29 | * |
||
30 | * @ORM\Id |
||
31 | * @ORM\Column(name="id", type="integer") |
||
32 | * @ORM\GeneratedValue(strategy="AUTO") |
||
33 | */ |
||
34 | protected $id; |
||
35 | |||
36 | /** |
||
37 | * @Assert\NotBlank() |
||
38 | * @Assert\Length(max="191") |
||
39 | * |
||
40 | * @ORM\Column(type="string", length=191) |
||
41 | */ |
||
42 | protected $apiKey; |
||
43 | |||
44 | /** |
||
45 | * @Assert\NotBlank() |
||
46 | * @Assert\Length(max="191") |
||
47 | * |
||
48 | * @ORM\Column(type="string", length=191) |
||
49 | */ |
||
50 | protected $merchant; |
||
51 | |||
52 | /** |
||
53 | * @ORM\Column(type="integer") |
||
54 | */ |
||
55 | protected $orderId; |
||
56 | |||
57 | /** |
||
58 | * @ORM\Column(type="text") |
||
59 | */ |
||
60 | protected $sessionId; |
||
61 | |||
62 | /** |
||
63 | * @Assert\NotBlank() |
||
64 | * @Assert\Length(max="191") |
||
65 | * |
||
66 | * @ORM\Column(type="string", length=191) |
||
67 | */ |
||
68 | protected $currencySymbol; |
||
69 | |||
70 | /** |
||
71 | * @Assert\NotBlank() |
||
72 | * |
||
73 | * @ORM\Column(type="integer") |
||
74 | */ |
||
75 | protected $totalAmountAmount; |
||
76 | |||
77 | /** |
||
78 | * @Assert\NotBlank() |
||
79 | * |
||
80 | * @ORM\Column(type="string") |
||
81 | */ |
||
82 | protected $totalAmountCurrency; |
||
83 | |||
84 | /** |
||
85 | * @Assert\NotBlank() |
||
86 | * @Assert\Length(max="191") |
||
87 | * |
||
88 | * @ORM\Column(type="string", length=191) |
||
89 | */ |
||
90 | protected $callBackUrl; |
||
91 | |||
92 | /** |
||
93 | * @Assert\NotBlank() |
||
94 | * @Assert\Length(max="191") |
||
95 | * |
||
96 | * @ORM\Column(type="string", length=191) |
||
97 | */ |
||
98 | protected $fullCallBackOkUrl; |
||
99 | |||
100 | /** |
||
101 | * @Assert\NotBlank() |
||
102 | * @Assert\Length(max="191") |
||
103 | * |
||
104 | * @ORM\Column(type="string", length=191) |
||
105 | */ |
||
106 | protected $callBackOkUrl; |
||
107 | |||
108 | /** |
||
109 | * @Assert\NotBlank() |
||
110 | * @Assert\Length(max="191") |
||
111 | * |
||
112 | * @ORM\Column(type="string", length=191) |
||
113 | */ |
||
114 | protected $callBackServerUrl; |
||
115 | |||
116 | /** |
||
117 | * @Assert\NotBlank() |
||
118 | * |
||
119 | * @ORM\Column(type="integer") |
||
120 | */ |
||
121 | protected $languageId; |
||
122 | |||
123 | /** |
||
124 | * @Assert\NotBlank() |
||
125 | * @Assert\Length(max="191") |
||
126 | * |
||
127 | * @ORM\Column(type="string", length=191) |
||
128 | */ |
||
129 | protected $testMode; |
||
130 | |||
131 | /** |
||
132 | * @Assert\NotBlank() |
||
133 | * |
||
134 | * @ORM\Column(type="integer") |
||
135 | */ |
||
136 | protected $paymentGatewayCurrencyCode; |
||
137 | |||
138 | /** |
||
139 | * @Assert\NotBlank() |
||
140 | * |
||
141 | * @ORM\Column(type="integer") |
||
142 | */ |
||
143 | protected $cardTypeId; |
||
144 | |||
145 | /** |
||
146 | * @Assert\NotBlank() |
||
147 | * @Assert\Length(max="191") |
||
148 | * |
||
149 | * @ORM\Column(type="string", length=191) |
||
150 | */ |
||
151 | protected $customerRekvNr; |
||
152 | |||
153 | /** |
||
154 | * @Assert\NotBlank() |
||
155 | * @Assert\Length(max="191") |
||
156 | * |
||
157 | * @ORM\Column(type="string", length=191) |
||
158 | */ |
||
159 | protected $customerName; |
||
160 | |||
161 | /** |
||
162 | * @ORM\Column(type="string", nullable=true) |
||
163 | */ |
||
164 | protected $customerCompany; |
||
165 | |||
166 | /** |
||
167 | * @Assert\NotBlank() |
||
168 | * @Assert\Length(max="191") |
||
169 | * |
||
170 | * @ORM\Column(type="string", length=191) |
||
171 | */ |
||
172 | protected $customerAddress; |
||
173 | |||
174 | /** |
||
175 | * @ORM\Column(type="string", nullable=true) |
||
176 | */ |
||
177 | protected $customerAddress2; |
||
178 | |||
179 | /** |
||
180 | * @Assert\NotBlank() |
||
181 | * @Assert\Length(max="191") |
||
182 | * |
||
183 | * @ORM\Column(type="string", length=191) |
||
184 | */ |
||
185 | protected $customerZipCode; |
||
186 | |||
187 | /** |
||
188 | * @Assert\NotBlank() |
||
189 | * @Assert\Length(max="191") |
||
190 | * |
||
191 | * @ORM\Column(type="string", length=191) |
||
192 | */ |
||
193 | protected $customerCity; |
||
194 | |||
195 | /** |
||
196 | * @Assert\NotBlank() |
||
197 | * |
||
198 | * @ORM\Column(type="integer") |
||
199 | */ |
||
200 | protected $customerCountryId; |
||
201 | |||
202 | /** |
||
203 | * @Assert\NotBlank() |
||
204 | * @Assert\Length(max="191") |
||
205 | * |
||
206 | * @ORM\Column(type="string", length=191) |
||
207 | */ |
||
208 | protected $customerCountry; |
||
209 | |||
210 | /** |
||
211 | * @Assert\NotBlank() |
||
212 | * @Assert\Length(max="191") |
||
213 | * |
||
214 | * @ORM\Column(type="string", length=191) |
||
215 | */ |
||
216 | protected $customerPhone; |
||
217 | |||
218 | /** |
||
219 | * @ORM\Column(type="string", nullable=true) |
||
220 | */ |
||
221 | protected $customerFax; |
||
222 | |||
223 | /** |
||
224 | * @Assert\NotBlank() |
||
225 | * @Assert\Length(max="191") |
||
226 | * |
||
227 | * @ORM\Column(type="string", length=191) |
||
228 | */ |
||
229 | protected $customerEmail; |
||
230 | |||
231 | /** |
||
232 | * @ORM\Column(type="text", nullable=true) |
||
233 | */ |
||
234 | protected $customerNote; |
||
235 | |||
236 | /** |
||
237 | * @ORM\Column(type="string", nullable=true, length=191) |
||
238 | */ |
||
239 | protected $customerCvrnr; |
||
240 | |||
241 | /** |
||
242 | * @Assert\NotBlank() |
||
243 | * |
||
244 | * @ORM\Column(type="integer") |
||
245 | */ |
||
246 | protected $customerCustTypeId; |
||
247 | |||
248 | /** |
||
249 | * @ORM\Column(type="string", nullable=true, length=191) |
||
250 | */ |
||
251 | protected $customerEan; |
||
252 | |||
253 | /** |
||
254 | * @ORM\Column(type="string", nullable=true, length=191) |
||
255 | */ |
||
256 | protected $customerRes1; |
||
257 | |||
258 | /** |
||
259 | * @ORM\Column(type="string", nullable=true, length=191) |
||
260 | */ |
||
261 | protected $customerRes2; |
||
262 | |||
263 | /** |
||
264 | * @ORM\Column(type="string", nullable=true, length=191) |
||
265 | */ |
||
266 | protected $customerRes3; |
||
267 | |||
268 | /** |
||
269 | * @ORM\Column(type="string", nullable=true, length=191) |
||
270 | */ |
||
271 | protected $customerRes4; |
||
272 | |||
273 | /** |
||
274 | * @ORM\Column(type="string", nullable=true, length=191) |
||
275 | */ |
||
276 | protected $customerRes5; |
||
277 | |||
278 | /** |
||
279 | * @Assert\NotBlank() |
||
280 | * @Assert\Length(max="191") |
||
281 | * |
||
282 | * @ORM\Column(type="string", length=191) |
||
283 | */ |
||
284 | protected $customerIp; |
||
285 | |||
286 | /** |
||
287 | * @ORM\Column(type="string", nullable=true, length=191) |
||
288 | */ |
||
289 | protected $deliveryName; |
||
290 | |||
291 | /** |
||
292 | * @ORM\Column(type="string", nullable=true, length=191) |
||
293 | */ |
||
294 | protected $deliveryCompany; |
||
295 | |||
296 | /** |
||
297 | * @ORM\Column(type="string", nullable=true, length=191) |
||
298 | */ |
||
299 | protected $deliveryAddress; |
||
300 | |||
301 | /** |
||
302 | * @ORM\Column(type="string", nullable=true, length=191) |
||
303 | */ |
||
304 | protected $deliveryAddress2; |
||
305 | |||
306 | /** |
||
307 | * @ORM\Column(type="string", nullable=true, length=191) |
||
308 | */ |
||
309 | protected $deliveryZipCode; |
||
310 | |||
311 | /** |
||
312 | * @ORM\Column(type="string", nullable=true, length=191) |
||
313 | */ |
||
314 | protected $deliveryCity; |
||
315 | |||
316 | /** |
||
317 | * @ORM\Column(type="integer", nullable=true) |
||
318 | */ |
||
319 | protected $deliveryCountryID; |
||
320 | |||
321 | /** |
||
322 | * @ORM\Column(type="string", nullable=true, length=191) |
||
323 | */ |
||
324 | protected $deliveryCountry; |
||
325 | |||
326 | /** |
||
327 | * @ORM\Column(type="string", nullable=true, length=191) |
||
328 | */ |
||
329 | protected $deliveryPhone; |
||
330 | |||
331 | /** |
||
332 | * @ORM\Column(type="string", nullable=true, length=191) |
||
333 | */ |
||
334 | protected $deliveryFax; |
||
335 | |||
336 | /** |
||
337 | * @ORM\Column(type="string", nullable=true, length=191) |
||
338 | */ |
||
339 | protected $deliveryEmail; |
||
340 | |||
341 | /** |
||
342 | * @ORM\Column(type="string", nullable=true, length=191) |
||
343 | */ |
||
344 | protected $deliveryEan; |
||
345 | |||
346 | /** |
||
347 | * @Assert\NotBlank() |
||
348 | * @Assert\Length(max="191") |
||
349 | * |
||
350 | * @ORM\Column(type="string", length=191) |
||
351 | */ |
||
352 | protected $shippingMethod; |
||
353 | |||
354 | /** |
||
355 | * @Assert\NotBlank() |
||
356 | * |
||
357 | * @ORM\Column(type="integer") |
||
358 | */ |
||
359 | protected $shippingFeeAmount; |
||
360 | |||
361 | /** |
||
362 | * @Assert\NotBlank() |
||
363 | * |
||
364 | * @ORM\Column(type="string") |
||
365 | */ |
||
366 | protected $shippingFeeCurrency; |
||
367 | |||
368 | /** |
||
369 | * @Assert\NotBlank() |
||
370 | * @Assert\Length(max="191") |
||
371 | * |
||
372 | * @ORM\Column(type="string", length=191) |
||
373 | */ |
||
374 | protected $paymentMethod; |
||
375 | |||
376 | /** |
||
377 | * @Assert\NotBlank() |
||
378 | * |
||
379 | * @ORM\Column(type="integer") |
||
380 | */ |
||
381 | protected $paymentFeeAmount; |
||
382 | |||
383 | /** |
||
384 | * @Assert\NotBlank() |
||
385 | * |
||
386 | * @ORM\Column(type="string") |
||
387 | */ |
||
388 | protected $paymentFeeCurrency; |
||
389 | |||
390 | /** |
||
391 | * @ORM\Column(type="string", nullable=true, length=191) |
||
392 | */ |
||
393 | protected $loadBalancerRealIp; |
||
394 | |||
395 | /** |
||
396 | * @var string |
||
397 | * |
||
398 | * @ORM\Column(type="string", nullable=true, length=191) |
||
399 | */ |
||
400 | protected $referrer; |
||
401 | |||
402 | /** |
||
403 | * @ORM\OneToMany(targetEntity="PaymentLine", mappedBy="payment", cascade={"persist", "remove"}, fetch="EAGER") |
||
404 | */ |
||
405 | protected $paymentLines; |
||
406 | |||
407 | /********************************** |
||
408 | * Properties specific to Altapay * |
||
409 | *********************************/ |
||
410 | |||
411 | /** |
||
412 | * @var string|null |
||
413 | * |
||
414 | * @ORM\Column(type="string", nullable=true, unique=true, length=191) |
||
415 | */ |
||
416 | protected $altapayId; |
||
417 | |||
418 | /** |
||
419 | * @var string|null |
||
420 | * |
||
421 | * @ORM\Column(type="string", nullable=true, length=191) |
||
422 | */ |
||
423 | protected $cardStatus; |
||
424 | |||
425 | /** |
||
426 | * @var string|null |
||
427 | * |
||
428 | * @ORM\Column(type="string", nullable=true, length=191) |
||
429 | */ |
||
430 | protected $creditCardToken; |
||
431 | |||
432 | /** |
||
433 | * @var string|null |
||
434 | * |
||
435 | * @ORM\Column(type="string", nullable=true, length=191) |
||
436 | */ |
||
437 | protected $creditCardMaskedPan; |
||
438 | |||
439 | /** |
||
440 | * @var string|null |
||
441 | * |
||
442 | * @ORM\Column(type="string", nullable=true, length=191) |
||
443 | */ |
||
444 | protected $threeDSecureResult; |
||
445 | |||
446 | /** |
||
447 | * @var string|null |
||
448 | * |
||
449 | * @ORM\Column(type="string", nullable=true, length=191) |
||
450 | */ |
||
451 | protected $liableForChargeback; |
||
452 | |||
453 | /** |
||
454 | * @var string|null |
||
455 | * |
||
456 | * @ORM\Column(type="string", nullable=true, length=191) |
||
457 | */ |
||
458 | protected $blacklistToken; |
||
459 | |||
460 | /** |
||
461 | * @var string|null |
||
462 | * |
||
463 | * @ORM\Column(type="string", nullable=true, length=191) |
||
464 | */ |
||
465 | protected $shop; |
||
466 | |||
467 | /** |
||
468 | * @var string|null |
||
469 | * |
||
470 | * @ORM\Column(type="string", nullable=true, length=191) |
||
471 | */ |
||
472 | protected $terminal; |
||
473 | |||
474 | /** |
||
475 | * @var string|null |
||
476 | * |
||
477 | * @ORM\Column(type="string", nullable=true, length=191) |
||
478 | */ |
||
479 | protected $transactionStatus; |
||
480 | |||
481 | /** |
||
482 | * @var string|null |
||
483 | * |
||
484 | * @ORM\Column(type="string", nullable=true, length=191) |
||
485 | */ |
||
486 | protected $reasonCode; |
||
487 | |||
488 | /** |
||
489 | * @var int|null |
||
490 | * |
||
491 | * @ORM\Column(type="integer", nullable=true) |
||
492 | */ |
||
493 | protected $merchantCurrency; |
||
494 | |||
495 | /** |
||
496 | * @var string|null |
||
497 | * |
||
498 | * @ORM\Column(type="string", nullable=true, length=191) |
||
499 | */ |
||
500 | protected $merchantCurrencyAlpha; |
||
501 | |||
502 | /** |
||
503 | * @var int|null |
||
504 | * |
||
505 | * @ORM\Column(type="integer", nullable=true) |
||
506 | */ |
||
507 | protected $cardHolderCurrency; |
||
508 | |||
509 | /** |
||
510 | * @var string|null |
||
511 | * |
||
512 | * @ORM\Column(type="string", nullable=true, length=191) |
||
513 | */ |
||
514 | protected $cardHolderCurrencyAlpha; |
||
515 | |||
516 | /** |
||
517 | * @var float|null |
||
518 | * |
||
519 | * @ORM\Column(type="decimal", precision=10, scale=2) |
||
520 | */ |
||
521 | protected $reservedAmount; |
||
522 | |||
523 | /** |
||
524 | * @var float|null |
||
525 | * |
||
526 | * @ORM\Column(type="decimal", precision=10, scale=2) |
||
527 | */ |
||
528 | protected $capturedAmount; |
||
529 | |||
530 | /** |
||
531 | * @var float|null |
||
532 | * |
||
533 | * @ORM\Column(type="decimal", precision=10, scale=2) |
||
534 | */ |
||
535 | protected $refundedAmount; |
||
536 | |||
537 | /** |
||
538 | * @var float|null |
||
539 | * |
||
540 | * @ORM\Column(type="decimal", precision=10, scale=2) |
||
541 | */ |
||
542 | protected $recurringDefaultAmount; |
||
543 | |||
544 | /** |
||
545 | * @var \DateTime|null |
||
546 | * |
||
547 | * @ORM\Column(type="datetime", nullable=true) |
||
548 | */ |
||
549 | protected $createdDate; |
||
550 | |||
551 | /** |
||
552 | * @var \DateTime|null |
||
553 | * |
||
554 | * @ORM\Column(type="datetime", nullable=true) |
||
555 | */ |
||
556 | protected $updatedDate; |
||
557 | |||
558 | /** |
||
559 | * @var string|null |
||
560 | * |
||
561 | * @ORM\Column(type="string", nullable=true, length=191) |
||
562 | */ |
||
563 | protected $paymentNature; |
||
564 | |||
565 | /** |
||
566 | * @var bool|null |
||
567 | * |
||
568 | * @ORM\Column(type="boolean", nullable=true) |
||
569 | */ |
||
570 | protected $supportsRefunds; |
||
571 | |||
572 | /** |
||
573 | * @var bool|null |
||
574 | * |
||
575 | * @ORM\Column(type="boolean", nullable=true) |
||
576 | */ |
||
577 | protected $supportsRelease; |
||
578 | |||
579 | /** |
||
580 | * @var bool|null |
||
581 | * |
||
582 | * @ORM\Column(type="boolean", nullable=true) |
||
583 | */ |
||
584 | protected $supportsMultipleCaptures; |
||
585 | |||
586 | /** |
||
587 | * @var bool|null |
||
588 | * |
||
589 | * @ORM\Column(type="boolean", nullable=true) |
||
590 | */ |
||
591 | protected $supportsMultipleRefunds; |
||
592 | |||
593 | /** |
||
594 | * @var float|null |
||
595 | * |
||
596 | * @ORM\Column(type="float", nullable=true) |
||
597 | */ |
||
598 | protected $fraudRiskScore; |
||
599 | |||
600 | /** |
||
601 | * @var string|null |
||
602 | * |
||
603 | * @ORM\Column(type="string", nullable=true, length=191) |
||
604 | */ |
||
605 | protected $fraudExplanation; |
||
606 | |||
607 | public function __construct() |
||
617 | |||
618 | public static function createPaymentLine(string $productNumber, string $name, int $quantity, Money $price, int $vat) |
||
622 | |||
623 | /** |
||
624 | * Returns true if the payment can be captured. |
||
625 | * |
||
626 | * @return bool |
||
627 | */ |
||
628 | public function isCaptureable(): bool |
||
640 | |||
641 | /** |
||
642 | * Returns true if the payment can be refunded. |
||
643 | * |
||
644 | * @return bool |
||
645 | */ |
||
646 | public function isRefundable(): bool |
||
658 | |||
659 | /** |
||
660 | * @return float |
||
661 | */ |
||
662 | public function refundableAmount() |
||
668 | |||
669 | /** |
||
670 | * @return float |
||
671 | */ |
||
672 | public function capturableAmount() |
||
679 | |||
680 | // @todo create type hints for getters and setters |
||
681 | |||
682 | public function setTotalAmount(Money $totalAmount): BasePayment |
||
691 | |||
692 | public function getTotalAmount(): ?Money |
||
705 | |||
706 | public function setShippingFee(Money $shippingFee): BasePayment |
||
715 | |||
716 | public function getShippingFee(): ?Money |
||
729 | |||
730 | public function setPaymentFee(Money $paymentFee): BasePayment |
||
739 | |||
740 | public function getPaymentFee(): ?Money |
||
753 | |||
754 | /** |
||
755 | * @return int |
||
756 | */ |
||
757 | public function getId(): ?int |
||
761 | |||
762 | /** |
||
763 | * @param int $id |
||
764 | * |
||
765 | * @return Payment |
||
766 | */ |
||
767 | public function setId(int $id): self |
||
773 | |||
774 | /** |
||
775 | * @return null|string |
||
776 | */ |
||
777 | public function getAltapayId() |
||
781 | |||
782 | /** |
||
783 | * @param null|string $altapayId |
||
784 | * |
||
785 | * @return Payment |
||
786 | */ |
||
787 | public function setAltapayId($altapayId) |
||
793 | |||
794 | /** |
||
795 | * @return null|string |
||
796 | */ |
||
797 | public function getCardStatus() |
||
801 | |||
802 | /** |
||
803 | * @param null|string $cardStatus |
||
804 | * |
||
805 | * @return Payment |
||
806 | */ |
||
807 | public function setCardStatus($cardStatus) |
||
813 | |||
814 | /** |
||
815 | * @return null|string |
||
816 | */ |
||
817 | public function getCreditCardToken() |
||
821 | |||
822 | /** |
||
823 | * @param null|string $creditCardToken |
||
824 | * |
||
825 | * @return Payment |
||
826 | */ |
||
827 | public function setCreditCardToken($creditCardToken) |
||
833 | |||
834 | /** |
||
835 | * @return null|string |
||
836 | */ |
||
837 | public function getCreditCardMaskedPan() |
||
841 | |||
842 | /** |
||
843 | * @param null|string $creditCardMaskedPan |
||
844 | * |
||
845 | * @return Payment |
||
846 | */ |
||
847 | public function setCreditCardMaskedPan($creditCardMaskedPan) |
||
853 | |||
854 | /** |
||
855 | * @return null|string |
||
856 | */ |
||
857 | public function getThreeDSecureResult() |
||
861 | |||
862 | /** |
||
863 | * @param null|string $threeDSecureResult |
||
864 | * |
||
865 | * @return Payment |
||
866 | */ |
||
867 | public function setThreeDSecureResult($threeDSecureResult) |
||
873 | |||
874 | /** |
||
875 | * @return null|string |
||
876 | */ |
||
877 | public function getLiableForChargeback() |
||
881 | |||
882 | /** |
||
883 | * @param null|string $liableForChargeback |
||
884 | * |
||
885 | * @return Payment |
||
886 | */ |
||
887 | public function setLiableForChargeback($liableForChargeback) |
||
893 | |||
894 | /** |
||
895 | * @return null|string |
||
896 | */ |
||
897 | public function getBlacklistToken() |
||
901 | |||
902 | /** |
||
903 | * @param null|string $blacklistToken |
||
904 | * |
||
905 | * @return Payment |
||
906 | */ |
||
907 | public function setBlacklistToken($blacklistToken) |
||
913 | |||
914 | /** |
||
915 | * @return null|string |
||
916 | */ |
||
917 | public function getShop() |
||
921 | |||
922 | /** |
||
923 | * @param null|string $shop |
||
924 | * |
||
925 | * @return Payment |
||
926 | */ |
||
927 | public function setShop($shop) |
||
933 | |||
934 | /** |
||
935 | * @return null|string |
||
936 | */ |
||
937 | public function getTerminal() |
||
941 | |||
942 | /** |
||
943 | * @param null|string $terminal |
||
944 | * |
||
945 | * @return Payment |
||
946 | */ |
||
947 | public function setTerminal($terminal) |
||
953 | |||
954 | /** |
||
955 | * @return null|string |
||
956 | */ |
||
957 | public function getTransactionStatus() |
||
961 | |||
962 | /** |
||
963 | * @param null|string $transactionStatus |
||
964 | * |
||
965 | * @return Payment |
||
966 | */ |
||
967 | public function setTransactionStatus($transactionStatus) |
||
973 | |||
974 | /** |
||
975 | * @return null|string |
||
976 | */ |
||
977 | public function getReasonCode() |
||
981 | |||
982 | /** |
||
983 | * @param null|string $reasonCode |
||
984 | * |
||
985 | * @return Payment |
||
986 | */ |
||
987 | public function setReasonCode($reasonCode) |
||
993 | |||
994 | /** |
||
995 | * @return int|null |
||
996 | */ |
||
997 | public function getMerchantCurrency() |
||
1001 | |||
1002 | /** |
||
1003 | * @param int|null $merchantCurrency |
||
1004 | * |
||
1005 | * @return Payment |
||
1006 | */ |
||
1007 | public function setMerchantCurrency($merchantCurrency) |
||
1013 | |||
1014 | /** |
||
1015 | * @return null|string |
||
1016 | */ |
||
1017 | public function getMerchantCurrencyAlpha() |
||
1021 | |||
1022 | /** |
||
1023 | * @param null|string $merchantCurrencyAlpha |
||
1024 | * |
||
1025 | * @return Payment |
||
1026 | */ |
||
1027 | public function setMerchantCurrencyAlpha($merchantCurrencyAlpha) |
||
1033 | |||
1034 | /** |
||
1035 | * @return int|null |
||
1036 | */ |
||
1037 | public function getCardHolderCurrency() |
||
1041 | |||
1042 | /** |
||
1043 | * @param int|null $cardHolderCurrency |
||
1044 | * |
||
1045 | * @return Payment |
||
1046 | */ |
||
1047 | public function setCardHolderCurrency($cardHolderCurrency) |
||
1053 | |||
1054 | /** |
||
1055 | * @return null|string |
||
1056 | */ |
||
1057 | public function getCardHolderCurrencyAlpha() |
||
1061 | |||
1062 | /** |
||
1063 | * @param null|string $cardHolderCurrencyAlpha |
||
1064 | * |
||
1065 | * @return Payment |
||
1066 | */ |
||
1067 | public function setCardHolderCurrencyAlpha($cardHolderCurrencyAlpha) |
||
1073 | |||
1074 | /** |
||
1075 | * @return float|null |
||
1076 | */ |
||
1077 | public function getReservedAmount() |
||
1081 | |||
1082 | /** |
||
1083 | * @param float|null $reservedAmount |
||
1084 | * |
||
1085 | * @return Payment |
||
1086 | */ |
||
1087 | public function setReservedAmount($reservedAmount) |
||
1093 | |||
1094 | /** |
||
1095 | * @return float|null |
||
1096 | */ |
||
1097 | public function getCapturedAmount() |
||
1101 | |||
1102 | /** |
||
1103 | * @param float|null $capturedAmount |
||
1104 | * |
||
1105 | * @return Payment |
||
1106 | */ |
||
1107 | public function setCapturedAmount($capturedAmount) |
||
1113 | |||
1114 | /** |
||
1115 | * @return float|null |
||
1116 | */ |
||
1117 | public function getRefundedAmount() |
||
1121 | |||
1122 | /** |
||
1123 | * @param float|null $refundedAmount |
||
1124 | * |
||
1125 | * @return Payment |
||
1126 | */ |
||
1127 | public function setRefundedAmount($refundedAmount) |
||
1133 | |||
1134 | /** |
||
1135 | * @return float|null |
||
1136 | */ |
||
1137 | public function getRecurringDefaultAmount() |
||
1141 | |||
1142 | /** |
||
1143 | * @param float|null $recurringDefaultAmount |
||
1144 | * |
||
1145 | * @return Payment |
||
1146 | */ |
||
1147 | public function setRecurringDefaultAmount($recurringDefaultAmount) |
||
1153 | |||
1154 | /** |
||
1155 | * @return \DateTime|null |
||
1156 | */ |
||
1157 | public function getCreatedDate() |
||
1161 | |||
1162 | /** |
||
1163 | * @param \DateTimeInterface|null $createdDate |
||
1164 | * |
||
1165 | * @return Payment |
||
1166 | */ |
||
1167 | public function setCreatedDate($createdDate) |
||
1173 | |||
1174 | /** |
||
1175 | * @return \DateTime|null |
||
1176 | */ |
||
1177 | public function getUpdatedDate() |
||
1181 | |||
1182 | /** |
||
1183 | * @param \DateTimeInterface|null $updatedDate |
||
1184 | * |
||
1185 | * @return Payment |
||
1186 | */ |
||
1187 | public function setUpdatedDate($updatedDate) |
||
1193 | |||
1194 | /** |
||
1195 | * @return null|string |
||
1196 | */ |
||
1197 | public function getPaymentNature() |
||
1201 | |||
1202 | /** |
||
1203 | * @param null|string $paymentNature |
||
1204 | * |
||
1205 | * @return Payment |
||
1206 | */ |
||
1207 | public function setPaymentNature($paymentNature) |
||
1213 | |||
1214 | /** |
||
1215 | * @return bool|null |
||
1216 | */ |
||
1217 | public function getSupportsRefunds() |
||
1221 | |||
1222 | /** |
||
1223 | * @param bool|null $supportsRefunds |
||
1224 | * |
||
1225 | * @return Payment |
||
1226 | */ |
||
1227 | public function setSupportsRefunds($supportsRefunds) |
||
1233 | |||
1234 | /** |
||
1235 | * @return bool|null |
||
1236 | */ |
||
1237 | public function getSupportsRelease() |
||
1241 | |||
1242 | /** |
||
1243 | * @param bool|null $supportsRelease |
||
1244 | * |
||
1245 | * @return Payment |
||
1246 | */ |
||
1247 | public function setSupportsRelease($supportsRelease) |
||
1253 | |||
1254 | /** |
||
1255 | * @return bool|null |
||
1256 | */ |
||
1257 | public function getSupportsMultipleCaptures() |
||
1261 | |||
1262 | /** |
||
1263 | * @param bool|null $supportsMultipleCaptures |
||
1264 | * |
||
1265 | * @return Payment |
||
1266 | */ |
||
1267 | public function setSupportsMultipleCaptures($supportsMultipleCaptures) |
||
1273 | |||
1274 | /** |
||
1275 | * @return bool|null |
||
1276 | */ |
||
1277 | public function getSupportsMultipleRefunds() |
||
1281 | |||
1282 | /** |
||
1283 | * @param bool|null $supportsMultipleRefunds |
||
1284 | * |
||
1285 | * @return Payment |
||
1286 | */ |
||
1287 | public function setSupportsMultipleRefunds($supportsMultipleRefunds) |
||
1293 | |||
1294 | /** |
||
1295 | * @return float|null |
||
1296 | */ |
||
1297 | public function getFraudRiskScore() |
||
1301 | |||
1302 | /** |
||
1303 | * @param float|null $fraudRiskScore |
||
1304 | * |
||
1305 | * @return Payment |
||
1306 | */ |
||
1307 | public function setFraudRiskScore($fraudRiskScore) |
||
1313 | |||
1314 | /** |
||
1315 | * @return null|string |
||
1316 | */ |
||
1317 | public function getFraudExplanation() |
||
1321 | |||
1322 | /** |
||
1323 | * @param null|string $fraudExplanation |
||
1324 | * |
||
1325 | * @return Payment |
||
1326 | */ |
||
1327 | public function setFraudExplanation($fraudExplanation) |
||
1333 | } |
||
1334 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..