BasePay.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\basic;
  12. /**
  13. * Class BasePay
  14. * @package crmeb\basic
  15. */
  16. abstract class BasePay extends BaseStorage
  17. {
  18. /**
  19. * 支付参数配置
  20. * @var array
  21. */
  22. protected $configPay = [];
  23. /**
  24. * 发起支付
  25. * @param array|null $configPay
  26. * @return mixed
  27. */
  28. abstract public function pay(?array $configPay = []);
  29. /**
  30. * 退款
  31. * @param array|null $configPay
  32. * @return mixed
  33. */
  34. abstract public function refund(?array $configPay = []);
  35. /**
  36. * 设置支付参数
  37. * @param array $configPay
  38. * @return $this
  39. */
  40. public function setConfigPay(array $configPay)
  41. {
  42. $this->configPay = $configPay;
  43. return $this;
  44. }
  45. }