1 | <?php |
||
8 | trait HasCardFields |
||
9 | { |
||
10 | /** @var string|null The property of $this->data to look up response fields by, or null if directly on $this->data */ |
||
11 | protected $lookupField; |
||
12 | |||
13 | abstract public function isSuccessful(); |
||
14 | |||
15 | public function getCardNumber() |
||
19 | |||
20 | public function getCardExpiryYear() |
||
25 | |||
26 | public function getCardExpiryMonth() |
||
31 | |||
32 | public function getCardholderName() |
||
36 | |||
37 | public function getCardType() |
||
45 | |||
46 | /** |
||
47 | * @param string $key Field to look for in the response (case-sensitive) |
||
48 | * @return null|string Value if it's present in the response, null if it's not |
||
49 | */ |
||
50 | protected function getResponseField($key) |
||
58 | |||
59 | /** |
||
60 | * @param string $yymm Expiry date in "yymm" format |
||
61 | * @return int[]|null[] Array with two elements, year and month |
||
62 | */ |
||
63 | protected function convertExpiryDate($yymm) |
||
71 | } |
||
72 |