@@ 236-247 (lines=12) @@ | ||
233 | * |
|
234 | * @return Collection |
|
235 | */ |
|
236 | public function refund($order): Collection |
|
237 | { |
|
238 | $this->payload = Support::filterPayload($this->payload, $order, true); |
|
239 | ||
240 | Events::dispatch(Events::METHOD_CALLED, new Events\MethodCalled('Wechat', 'Refund', $this->gateway, $this->payload)); |
|
241 | ||
242 | return Support::requestApi( |
|
243 | 'secapi/pay/refund', |
|
244 | $this->payload, |
|
245 | true |
|
246 | ); |
|
247 | } |
|
248 | ||
249 | /** |
|
250 | * Cancel an order. |
|
@@ 262-275 (lines=14) @@ | ||
259 | * |
|
260 | * @return Collection |
|
261 | */ |
|
262 | public function cancel($order): Collection |
|
263 | { |
|
264 | unset($this->payload['spbill_create_ip']); |
|
265 | ||
266 | $this->payload = Support::filterPayload($this->payload, $order, true); |
|
267 | ||
268 | Events::dispatch(Events::METHOD_CALLED, new Events\MethodCalled('Wechat', 'Cancel', $this->gateway, $this->payload)); |
|
269 | ||
270 | return Support::requestApi( |
|
271 | 'secapi/pay/reverse', |
|
272 | $this->payload, |
|
273 | true |
|
274 | ); |
|
275 | } |
|
276 | ||
277 | /** |
|
278 | * Close an order. |