Notify.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\api\controller;
  13. use app\common\library\wechat\WxPay;
  14. use app\common\exception\BaseException;
  15. /**
  16. * 支付成功异步通知接口
  17. * Class Notify
  18. * @package app\api\controller
  19. */
  20. class Notify
  21. {
  22. /**
  23. * 支付成功异步通知(微信小程序-微信支付)
  24. * @throws \think\db\exception\DataNotFoundException
  25. * @throws \think\db\exception\DbException
  26. * @throws \think\db\exception\ModelNotFoundException
  27. */
  28. public function wxpay()
  29. {
  30. // 微信支付组件:验证异步通知
  31. $WxPay = new WxPay();
  32. $WxPay->notify();
  33. }
  34. }