PayTransfer.php 1.1 KB

1234567891011121314151617181920212223242526
  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\wechatpay\event;
  13. use addon\wechatpay\model\Pay;
  14. class PayTransfer
  15. {
  16. public function handle(array $params){
  17. if ($params['transfer_type'] == 'wechatpay') {
  18. $is_weapp = $params['is_weapp'] ?? 0;
  19. $pay = new Pay($is_weapp);
  20. $res = $pay->transfer($params);
  21. return $res;
  22. }
  23. }
  24. }