1 | <?php |
||
21 | class CompletePurchaseResponse extends AbstractResponse |
||
22 | { |
||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * @var CompletePurchaseRequest |
||
26 | */ |
||
27 | public $request; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 8 | public function __construct(RequestInterface $request, $data) |
|
44 | |||
45 | /** |
||
46 | * Whether the payment is successful. |
||
47 | * |
||
48 | * @return boolean |
||
49 | */ |
||
50 | 2 | public function isSuccessful() |
|
54 | |||
55 | /** |
||
56 | * The checkout ID. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | 1 | public function getCheckoutId() |
|
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 4 | public function getSign() |
|
72 | |||
73 | /** |
||
74 | * The transaction identifier generated by the merchant website. |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | 1 | public function getTransactionId() |
|
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | 1 | public function getTransactionReference() |
|
90 | |||
91 | /** |
||
92 | * The amount of payment. |
||
93 | * |
||
94 | * @return mixed |
||
95 | */ |
||
96 | 1 | public function getAmount() |
|
100 | |||
101 | /** |
||
102 | * The currency of the payment. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | 1 | public function getCurrency() |
|
110 | |||
111 | /** |
||
112 | * The time of request processing. |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | 1 | public function getTime() |
|
120 | |||
121 | /** |
||
122 | * @return string the payment method inside a gateway (Visa, WebMoney, etc) |
||
123 | */ |
||
124 | 1 | public function getPayer() |
|
128 | |||
129 | /** |
||
130 | * The state of the payment. |
||
131 | * Possible results: |
||
132 | * - `new`: newly created payment |
||
133 | * - `waitAccept`: waits for the payment |
||
134 | * - `process`: the payment is being processed |
||
135 | * - `success`: the payment processed successfully |
||
136 | * - `canceled`: the payment have been canceled |
||
137 | * - `fail`: the payment failed. |
||
138 | * |
||
139 | * @return string |
||
140 | * @see isSuccessful |
||
141 | */ |
||
142 | 3 | public function getState() |
|
146 | } |
||
147 |