| Total Complexity | 14 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class RedirectCompleteFlowResponse extends AbstractResponse implements RedirectResponseInterface |
||
| 12 | { |
||
| 13 | public function isSuccessful() |
||
| 14 | { |
||
| 15 | return !isset($this->data['error']) && isset($this->data['redirect_flows']); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function isRedirect() |
||
| 19 | { |
||
| 20 | return false; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getTransactionReference() |
||
| 24 | { |
||
| 25 | if ($this->isSuccessful()) { |
||
| 26 | return $this->data['redirect_flows']['id']; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getMessage() |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getRedirectUrl() |
||
| 38 | { |
||
| 39 | if ($this->isSuccessful()) { |
||
| 40 | return $this->data['redirect_flows']['confirmation_url']; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getRedirectMethod() |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getRedirectData() |
||
| 50 | { |
||
| 51 | return null; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getMandateId() |
||
| 55 | { |
||
| 56 | if ($this->isSuccessful()) { |
||
| 57 | return $this->data['redirect_flows']['links']['mandate']; |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Treat mandate as a 'card' to support createCard pattern |
||
| 63 | */ |
||
| 64 | public function getCardReference() |
||
| 67 | } |
||
| 68 | } |
||
| 69 |