1 | <?php |
||
14 | class CompletePurchaseResponse extends AbstractResponse |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritDoc} |
||
18 | * |
||
19 | * @throws InvalidResponseException If error status is missing |
||
20 | */ |
||
21 | 9 | public function __construct(RequestInterface $request, $data) |
|
29 | |||
30 | /** |
||
31 | * Is the response an error? |
||
32 | * |
||
33 | * @return boolean |
||
34 | */ |
||
35 | 8 | protected function isError() |
|
39 | |||
40 | /** |
||
41 | * Is the response successful? |
||
42 | * |
||
43 | * @return boolean |
||
44 | */ |
||
45 | 8 | public function isSuccessful() |
|
49 | |||
50 | /** |
||
51 | * Get the authorisation code if available. |
||
52 | * |
||
53 | * @return null|string |
||
54 | */ |
||
55 | 3 | public function getTransactionReference() |
|
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | 4 | public function getTransactionId() |
|
67 | |||
68 | /** |
||
69 | * Get the merchant response message if available. |
||
70 | * |
||
71 | * @return null|string |
||
72 | */ |
||
73 | 8 | public function getMessage() |
|
86 | |||
87 | /** |
||
88 | * Get the card type used if available. |
||
89 | * |
||
90 | * @return null|string |
||
91 | */ |
||
92 | 1 | public function getCardType() |
|
96 | |||
97 | /** |
||
98 | * Get the amount paid in the transaction if available. |
||
99 | * |
||
100 | * The amount paid if given is the integer value in pence e.g. '1000' for £10.00 |
||
101 | * |
||
102 | * @return null|string The floating point value |
||
103 | */ |
||
104 | 1 | public function getAmountPaid() |
|
108 | } |
||
109 |