PayRefund.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // +---------------------------------------------------------------------+
  3. // | NiuCloud | [ WE CAN DO IT JUST NiuCloud ]  |
  4. // +---------------------------------------------------------------------+
  5. // | Copy right 2019-2029 www.niucloud.com  |
  6. // +---------------------------------------------------------------------+
  7. // | Author | NiuCloud <niucloud@outlook.com>  |
  8. // +---------------------------------------------------------------------+
  9. // | Repository | https://github.com/niucloud/framework.git  |
  10. // +---------------------------------------------------------------------+
  11. declare (strict_types = 1);
  12. namespace addon\alipay\event;
  13. use addon\alipay\model\Pay as PayModel;
  14. /**
  15. * 原路退款
  16. */
  17. class PayRefund
  18. {
  19. /**
  20. * 关闭支付
  21. */
  22. public function handle($params)
  23. {
  24. if($params["pay_info"]["pay_type"] == "alipay"){
  25. $pay_model = new PayModel();
  26. $result = $pay_model->refund($params);
  27. return $result;
  28. }
  29. }
  30. }