PayInterface.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\services\pay;
  12. /**
  13. * 支付接口类
  14. * Interface PayInterface
  15. * @package crmeb\services\pay
  16. */
  17. interface PayInterface
  18. {
  19. /**
  20. * 设置支付类型
  21. * @param string $type 支付类型
  22. * @return $this
  23. */
  24. public function setPayType(string $type);
  25. /**
  26. * 创建支付
  27. * @param string $orderId 订单号
  28. * @param string $totalFee 支付金额
  29. * @param string $attach 回调内容
  30. * @param string $body 支付body
  31. * @param string $detail 详情
  32. * @param string $tradeType 支付类型
  33. * @param array $options 其他参数
  34. * @return mixed
  35. */
  36. public function create(string $orderId, string $totalFee, string $attach, string $body, string $detail, array $options = []);
  37. /**
  38. * 企业支付到零钱
  39. * @param string $openid openid
  40. * @param string $orderId 订单id
  41. * @param string $amount 支付金额
  42. * @param array $options 其他参数
  43. * @return mixed
  44. */
  45. public function merchantPay(string $openid, string $orderId, string $amount, array $options = []);
  46. /**
  47. * 退款
  48. * @param string $outTradeNo 退款单号
  49. * @param string $totalAmount 退款金额
  50. * @param string $refund_id 退款
  51. * @param array $options 其他参数
  52. * @return mixed
  53. */
  54. public function refund(string $outTradeNo, array $options = []);
  55. /**
  56. * 查询订单
  57. * @param string $outTradeNo 退款单号
  58. * @param string $outRequestNo 支付商户单号
  59. * @param array $other 其他参数
  60. * @return mixed
  61. */
  62. public function queryRefund(string $outTradeNo, string $outRequestNo, array $other = []);
  63. /**
  64. * 支付回调
  65. * @return mixed
  66. */
  67. public function handleNotify();
  68. }