RefundGateway.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace Yansongda\Pay\Gateways\Wechat;
  3. use Yansongda\Pay\Exceptions\InvalidArgumentException;
  4. class RefundGateway extends Gateway
  5. {
  6. /**
  7. * Find.
  8. *
  9. * @author yansongda <me@yansongda.cn>
  10. *
  11. * @param $order
  12. */
  13. public function find($order): array
  14. {
  15. return [
  16. 'endpoint' => 'pay/refundquery',
  17. 'order' => is_array($order) ? $order : ['out_trade_no' => $order],
  18. 'cert' => false,
  19. ];
  20. }
  21. /**
  22. * Pay an order.
  23. *
  24. * @author yansongda <me@yansongda.cn>
  25. *
  26. * @param string $endpoint
  27. *
  28. * @throws InvalidArgumentException
  29. */
  30. public function pay($endpoint, array $payload)
  31. {
  32. throw new InvalidArgumentException('Not Support Refund In Pay');
  33. }
  34. /**
  35. * Get trade type config.
  36. *
  37. * @author yansongda <me@yansongda.cn>
  38. *
  39. * @throws InvalidArgumentException
  40. */
  41. protected function getTradeType()
  42. {
  43. throw new InvalidArgumentException('Not Support Refund In Pay');
  44. }
  45. }