PayClose.php 902 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\wechatpay\event;
  11. use addon\wechatpay\model\Pay as PayModel;
  12. /**
  13. * 关闭支付
  14. */
  15. class PayClose
  16. {
  17. /**
  18. * 关闭支付
  19. */
  20. public function handle($params)
  21. {
  22. // if ($params["pay_type"] == "wechatpay") {
  23. try {
  24. $pay_model = new PayModel(0, $params['site_id']);
  25. $result = $pay_model->close($params);
  26. return $result;
  27. }catch (\Exception $e) {
  28. return $pay_model->error([], $e->getMessage());
  29. }
  30. // }
  31. }
  32. }