1 | <?php |
||
21 | class Gateway extends AbstractGateway |
||
22 | { |
||
23 | /** |
||
24 | * Get gateway display name. |
||
25 | * |
||
26 | * This can be used by carts to get the display name for each gateway. |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | public function getName() |
||
34 | |||
35 | 3 | /** |
|
36 | * Get the gateway parameters. |
||
37 | 3 | * |
|
38 | * @return array |
||
39 | */ |
||
40 | public function getDefaultParameters() |
||
48 | 84 | ||
49 | 84 | /** |
|
50 | 84 | * Get a merchant id. |
|
51 | 84 | * |
|
52 | * @return string |
||
53 | */ |
||
54 | public function getMerchantId() |
||
58 | |||
59 | 3 | /** |
|
60 | * Set a merchant id. |
||
61 | 3 | * |
|
62 | * @param string $value |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setMerchantId($value) |
||
70 | |||
71 | 27 | /** |
|
72 | * Get a merchant's product id. |
||
73 | 27 | * |
|
74 | * @return string |
||
75 | */ |
||
76 | public function getProductId() |
||
80 | |||
81 | 3 | /** |
|
82 | * Set a merchant's product id. |
||
83 | 3 | * |
|
84 | * @param string $value |
||
85 | * |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function setProductId($value) |
||
92 | |||
93 | 27 | /** |
|
94 | * Get a secret word. |
||
95 | 27 | * |
|
96 | * @return string |
||
97 | */ |
||
98 | public function getSecretWord() |
||
102 | |||
103 | 3 | /** |
|
104 | * Set a secret word. |
||
105 | 3 | * |
|
106 | * @param string $value |
||
107 | * |
||
108 | * @return $this |
||
109 | */ |
||
110 | public function setSecretWord($value) |
||
114 | |||
115 | 27 | /** |
|
116 | * Authorize request. |
||
117 | 27 | * |
|
118 | * An Authorize request is similar to a purchase request but the |
||
119 | * charge issues an authorization (or pre-authorization), and no money |
||
120 | * is transferred. The transaction will need to be captured later |
||
121 | * in order to effect payment. |
||
122 | * |
||
123 | * @param array $options |
||
124 | * |
||
125 | * @return AuthorizeRequest|AbstractRequest |
||
126 | */ |
||
127 | public function authorize(array $options = []) |
||
131 | |||
132 | 9 | /** |
|
133 | * Handle return from off-site gateways after authorization. |
||
134 | 9 | * |
|
135 | * @param array $options |
||
136 | * |
||
137 | * @return CompleteAuthorizeRequest|AbstractRequest |
||
138 | */ |
||
139 | public function completeAuthorize(array $options = []) |
||
143 | |||
144 | 6 | /** |
|
145 | * Capture Request. |
||
146 | 6 | * |
|
147 | * Use this request to capture and process a previously created authorization. |
||
148 | * |
||
149 | * @param array $options |
||
150 | * |
||
151 | * @return CaptureRequest|AbstractRequest |
||
152 | */ |
||
153 | public function capture(array $options = []) |
||
157 | |||
158 | 6 | /** |
|
159 | * Purchase request. |
||
160 | 6 | * |
|
161 | * Authorize and immediately capture an amount on the customers card. |
||
162 | * |
||
163 | * @param array $options |
||
164 | * |
||
165 | * @return PurchaseRequest|AbstractRequest |
||
166 | */ |
||
167 | public function purchase(array $options = []) |
||
171 | |||
172 | 6 | /** |
|
173 | * Complete purchase request. |
||
174 | 6 | * |
|
175 | * Handle return from off-site gateways after purchase. |
||
176 | * |
||
177 | * @param array $options |
||
178 | * |
||
179 | * @return CompletePurchaseRequest|AbstractRequest |
||
180 | */ |
||
181 | public function completePurchase(array $options = []) |
||
185 | |||
186 | 6 | /** |
|
187 | * Refund request. |
||
188 | 6 | * |
|
189 | * Refund an already processed transaction. |
||
190 | * |
||
191 | * @param array $options |
||
192 | * |
||
193 | * @return RefundRequest|AbstractRequest |
||
194 | */ |
||
195 | public function refund(array $options = []) |
||
199 | |||
200 | 6 | /** |
|
201 | * Void request. |
||
202 | 6 | * |
|
203 | * Generally can only be called up to 24 hours after submitting a transaction. |
||
204 | * |
||
205 | * @param array $options |
||
206 | * |
||
207 | * @return VoidRequest|AbstractRequest |
||
208 | */ |
||
209 | public function void(array $options = []) |
||
213 | |||
214 | 6 | /** |
|
215 | * Status request. |
||
216 | 6 | * |
|
217 | * @param array $options |
||
218 | * |
||
219 | * @return StatusRequest|AbstractRequest |
||
220 | */ |
||
221 | public function status(array $options = []) |
||
225 | } |
||
226 |