1 | <?php |
||
10 | class CompletePurchaseResponse extends AbstractResponse |
||
11 | { |
||
12 | /** |
||
13 | * Is the response successful? |
||
14 | * |
||
15 | * @return boolean |
||
16 | */ |
||
17 | 2 | public function isSuccessful() |
|
18 | { |
||
19 | 2 | return $this->data->transactionState == 'COMPLETE' && $this->data->paymentResult->status == 'SUCCESS'; |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * Get the authorisation code if available. |
||
24 | * |
||
25 | * @return null|string |
||
26 | */ |
||
27 | 2 | public function getTransactionReference() |
|
31 | |||
32 | /** |
||
33 | * Get the merchant response message if available. |
||
34 | * |
||
35 | * @return null|string |
||
36 | */ |
||
37 | 2 | public function getMessage() |
|
49 | 2 | ||
50 | /** |
||
51 | * Get the card brand if available e.g. Visa |
||
52 | * |
||
53 | * @return null|string |
||
54 | */ |
||
55 | public function getCardBrand() |
||
59 | 2 | ||
60 | /** |
||
61 | * Get the card expiry if available e.g. Visa |
||
62 | * |
||
63 | * @return null|string |
||
64 | */ |
||
65 | public function getCardExpiry() |
||
69 | 2 | ||
70 | /** |
||
71 | * Get the card masked number if available e.g. Visa |
||
72 | * |
||
73 | * @return null|string |
||
74 | */ |
||
75 | public function getCardNumber() |
||
79 | } |
||
80 |