GatewayInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace Yansongda\Pay\Contracts;
  3. interface GatewayInterface
  4. {
  5. /**
  6. * pay a order.
  7. *
  8. * @author yansongda <me@yansongda.cn>
  9. *
  10. * @param array $config_biz
  11. *
  12. * @return mixed
  13. */
  14. public function pay(array $config_biz);
  15. /**
  16. * refund a order.
  17. *
  18. * @author yansongda <me@yansongda.cn>
  19. *
  20. * @param array|string $config_biz
  21. *
  22. * @return array|bool
  23. */
  24. public function refund($config_biz);
  25. /**
  26. * close a order.
  27. *
  28. * @author yansongda <me@yansongda.cn>
  29. *
  30. * @param array|string $config_biz
  31. *
  32. * @return array|bool
  33. */
  34. public function close($config_biz);
  35. /**
  36. * find a order.
  37. *
  38. * @author yansongda <me@yansongda.cn>
  39. *
  40. * @param string $out_trade_no
  41. *
  42. * @return array|bool
  43. */
  44. public function find($out_trade_no);
  45. /**
  46. * verify notify.
  47. *
  48. * @author yansongda <me@yansongda.cn>
  49. *
  50. * @param mixed $data
  51. * @param string $sign
  52. * @param bool $sync
  53. *
  54. * @return array|bool
  55. */
  56. public function verify($data, $sign = null, $sync = false);
  57. }