| Total Complexity | 11 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class NotificationResponse extends AbstractResponse implements NotificationInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | |||
| 13 | protected $token; |
||
| 14 | |||
| 15 | |||
| 16 | protected $status; |
||
| 17 | |||
| 18 | |||
| 19 | public function setToken($value) |
||
| 20 | { |
||
| 21 | $this->token = $value; |
||
| 22 | } |
||
| 23 | |||
| 24 | |||
| 25 | public function isSuccessful() |
||
| 26 | { |
||
| 27 | return $this->status == static::STATUS_COMPLETED; |
||
| 28 | } |
||
| 29 | |||
| 30 | |||
| 31 | public function getTransactionId() |
||
| 32 | { |
||
| 33 | return $this->getData()['transactionId']; |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | public function getTransactionReference() |
||
| 38 | { |
||
| 39 | return null; |
||
| 40 | } |
||
| 41 | |||
| 42 | |||
| 43 | public function getTransactionStatus() |
||
| 44 | { |
||
| 45 | return $this->status; |
||
| 46 | } |
||
| 47 | |||
| 48 | |||
| 49 | public function getMessage() |
||
| 50 | { |
||
| 51 | return $this->getData()['message']; |
||
| 52 | } |
||
| 53 | |||
| 54 | |||
| 55 | public function accept() |
||
| 56 | { |
||
| 57 | return $this->confirm(); |
||
| 58 | } |
||
| 59 | |||
| 60 | |||
| 61 | public function success() |
||
| 64 | } |
||
| 65 | |||
| 66 | |||
| 67 | public function confirm() |
||
| 68 | { |
||
| 69 | // 查询 |
||
| 70 | $fetchResponse = $this->request->fetchTransaction($this->token); |
||
|
|
|||
| 71 | $this->data['confirmData'] = $fetchResponse->getData(); |
||
| 90 | } |