1 | <?php |
||
20 | class CompletePurchaseResponse extends AbstractResponse |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | * @var CompletePurchaseRequest |
||
25 | */ |
||
26 | public $request; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | 8 | public function __construct(RequestInterface $request, $data) |
|
50 | |||
51 | /** |
||
52 | * Whether the payment is successful. |
||
53 | * |
||
54 | * @return boolean |
||
55 | */ |
||
56 | 2 | public function isSuccessful() |
|
60 | |||
61 | /** |
||
62 | * The checkout ID. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 4 | public function getCheckoutId() |
|
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | 4 | public function getSign() |
|
78 | |||
79 | /** |
||
80 | * The transaction identifier generated by the merchant website. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | 1 | public function getTransactionId() |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 1 | public function getTransactionReference() |
|
96 | |||
97 | /** |
||
98 | * The amount of payment. |
||
99 | * |
||
100 | * @return mixed |
||
101 | */ |
||
102 | 1 | public function getAmount() |
|
106 | |||
107 | /** |
||
108 | * The currency of the payment. |
||
109 | * @return string |
||
110 | */ |
||
111 | 1 | public function getCurrency() |
|
115 | |||
116 | /** |
||
117 | * The time of request processing. |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | 1 | public function getTime() |
|
126 | |||
127 | /** |
||
128 | * @return string the payment method inside a gateway (Visa, WebMoney, etc) |
||
129 | */ |
||
130 | 1 | public function getPayer() |
|
134 | |||
135 | /** |
||
136 | * The state of the payment. |
||
137 | * Possible results: |
||
138 | * - `new`: newly created payment |
||
139 | * - `waitAccept`: waits for the payment |
||
140 | * - `process`: the payment is being processed |
||
141 | * - `success`: the payment processed successfully |
||
142 | * - `canceled`: the payment have been canceled |
||
143 | * - `fail`: the payment failed. |
||
144 | * |
||
145 | * @return string |
||
146 | * @see isSuccessful |
||
147 | */ |
||
148 | 3 | public function getState() |
|
152 | } |
||
153 |