yingzi 2 سال پیش
والد
کامیت
009b123e2a
40فایلهای تغییر یافته به همراه1462 افزوده شده و 291 حذف شده
  1. 1 1
      app/api/controller/Pub.php
  2. 176 2
      app/api/controller/User.php
  3. 3 0
      app/api/route/user.php
  4. 14 0
      app/model/api/ShowTemplateOrder.php
  5. 7 7
      composer.lock
  6. 13 9
      config/wxpay.php
  7. BIN
      config/wxpay/cert/apiclient_cert.p12
  8. 20 19
      config/wxpay/cert/apiclient_cert.pem
  9. 26 26
      config/wxpay/cert/apiclient_key.pem
  10. 0 23
      config/wxpay/cert/wechatpay_530DF99182E31D78A00BB53236B3A68B357FE746.pem
  11. 245 0
      library/utils/WxpayV2.php
  12. 424 0
      library/utils/qnWxPay.php
  13. 204 0
      library/utils/weixinPayV2Old.php
  14. 18 0
      vendor/autoload.php
  15. 117 11
      vendor/bin/CertificateDownloader.php
  16. 2 1
      vendor/bin/CertificateDownloader.php.bat
  17. 27 14
      vendor/composer/ClassLoader.php
  18. 9 7
      vendor/composer/InstalledVersions.php
  19. 1 1
      vendor/composer/autoload_classmap.php
  20. 5 5
      vendor/composer/autoload_files.php
  21. 1 1
      vendor/composer/autoload_namespaces.php
  22. 1 1
      vendor/composer/autoload_psr4.php
  23. 12 42
      vendor/composer/autoload_real.php
  24. 4 4
      vendor/composer/autoload_static.php
  25. 7 7
      vendor/composer/installed.json
  26. 61 61
      vendor/composer/installed.php
  27. 1 1
      vendor/services.php
  28. 15 0
      vendor/wechatpay/wechatpay/CHANGELOG.md
  29. 4 4
      vendor/wechatpay/wechatpay/README.md
  30. 3 1
      vendor/wechatpay/wechatpay/README_APIv2.md
  31. 30 0
      vendor/wechatpay/wechatpay/SECURITY.md
  32. 1 1
      vendor/wechatpay/wechatpay/bin/README.md
  33. 0 28
      vendor/wechatpay/wechatpay/bin/cert/apiclient_key.pem
  34. 1 1
      vendor/wechatpay/wechatpay/composer.json
  35. 2 2
      vendor/wechatpay/wechatpay/src/Builder.php
  36. 1 1
      vendor/wechatpay/wechatpay/src/ClientDecoratorInterface.php
  37. 3 1
      vendor/wechatpay/wechatpay/src/ClientJsonTrait.php
  38. 1 6
      vendor/wechatpay/wechatpay/src/ClientXmlTrait.php
  39. 1 2
      vendor/wechatpay/wechatpay/src/Transformer.php
  40. 1 1
      vendor/wechatpay/wechatpay/src/Util/PemUtil.php

+ 1 - 1
app/api/controller/Pub.php

@@ -74,7 +74,7 @@ class Pub extends BaseController
         //验证是否购买过并添加浏览记录
         $this->checkUser($request->header("token", ""));
         if(!empty($this->user)){
-            $data["is_use"]=(new UserShowTemplate)->where("uid",$this->user["uid"])->count()>0?1:0;
+            $data["is_use"]=(new UserShowTemplate)->where("uid",$this->user["uid"])->where("show_template_id",$data["id"])->count()>0?1:0;
             (new ShowTemplate)->where('id', $data["id"])->inc('look_count', 1)->update();
         }
         return app('json')->success($data);

+ 176 - 2
app/api/controller/User.php

@@ -23,11 +23,15 @@ use app\model\api\ServiceType;
 use app\model\api\ServiceTimeType;
 use app\model\api\City as CityModel;
 use app\model\api\Sys as SysModel;
+use app\model\api\ShowTemplate;
+use app\model\api\ShowTemplateOrder;
+use app\model\api\UserShowTemplate;
+use app\model\api\PayTradeModel;
 
 use app\Request;
 use library\services\UtilService;
 use library\utils\QRcodeComm;
-use library\utils\weixinPay as wxpayApi;
+use library\utils\WxpayV2 as wxpayApi;
 use think\db\exception\DbException;
 use library\lib\weixina;
 use think\facade\Db;
@@ -284,10 +288,180 @@ class User extends BaseController
         }
         return app('json')->success("提交成功,请耐心等待审核");
     }
-   
     
     
     
+    /**
+     * 模板订单提交[第一步]
+     * @param Request $request
+     */
+    public function subShowTemplateOrder(Request $request){
+        [$id,$pay_type] = UtilService::getMore([
+            ['id','','empty','参数错误'],
+            ['pay_type','','empty','请选择支付方式'],
+        ],$request,true);
+        
+        if(!in_array($pay_type,["wxpay","balance"])){
+            return app('json')->fail('不支持该支付方式!');
+        }
+        //缓存
+        $redis = \think\facade\Cache::store('redis');
+        $key   = 'show_template_order_sub_' . $request->user['uid'];
+        $bool  = $redis->handler()->exists($key);
+        if ($bool) {
+            return app('json')->fail('请务重复操作,请稍等在重试!');
+        }
+        $redis->set($key,1,5);//5秒缓存
+        $proData = (new ShowTemplate)->where("id",$id)->where("status",1)->find();
+        if(empty($proData)){
+            return app('json')->fail("当前模板已下架");
+        }
+        $proData = $proData->toArray();
+        $count = (new UserShowTemplate)->where("uid",$request->user['uid'])->where("show_template_id",$id)->count();
+        if($count>0){
+            return app('json')->fail("您已购买过当前模板");
+        }
+        $orderCount = (new ShowTemplateOrder)->where("uid",$request->user['uid'])->where("show_template_id",$id)->where("status",">",-1)->count();
+        if($orderCount>0){
+            return app('json')->fail("您已下单该模板,请勿重复下单");
+        }
+        $price = floatval($proData["price"]);
+//        if($price<0.01){
+//            return app('json')->fail("模板信息错误");
+//        }
+        $allMoney    = $price;//订单商品费用
+        $total_money = $allMoney;//订单总费用
+        $payMoney    = $total_money;//订单需支付费用
+        $payMoney    = $payMoney <= 0 ? 0 : $payMoney;
+        $nowTime     = time();
+
+        //主订单数据
+        $save=[];
+        $save['uid']          = $request->user['uid'];
+        $save['order_id']     =  makeOrderId($request->user['uid'],"A");
+        $save['pay_type']     = $pay_type;//目前只支持微信支付
+        $save['total_money']  = $total_money;//订单总金额
+        $save['all_money']    = $allMoney;//商品中金额
+        $save['pay_money']    = $payMoney;//实际支付金额
+        $save['balance']      = 0;//余额支付了多少(目前没有余额支付)
+        $save['status']       = $payMoney <= 0 ? 1 : 0;
+        $save['pay_time']     = $payMoney <= 0 ? time() : 0;
+        $save['time']         = $nowTime;
+        
+        $save['show_template_id']    = $proData["id"];
+        $save['show_template_title'] = $proData["title"];;
+        $save['show_template_price'] = $proData["price"];
+        $save['show_template_img']   = empty($proData["imgs"]) ? "" : explode(",", $proData["imgs"])[0];
+        $save['show_template_code']  = $proData["code"];
+        try{
+            Db::startTrans();
+            $o_id = (new ShowTemplateOrder)->insertGetId($save);
+            if(empty($o_id)){
+                return app('json')->fail("订单提交失败");
+            }
+            //不需要支付
+            if($save['status']==1){
+                Db::commit();
+                return app("json")->success(["order_id"=>$save['order_id'],"money"=>$payMoney,"status"=>$save['status']]);
+            }
+            if(empty($request->user['openid'])){
+                Db::rollback();
+                return app('json')->fail('用户还未绑定微信!');
+            }
+            //清理之前支付凭证 || 防止重复购买
+            $payTrade = (new PayTradeModel)
+                    ->where("uid",$request->user["uid"])
+                    ->where("o_id",$o_id)
+                    ->where("type","temp")
+                    ->where("status",0)
+                    ->where("time","<",time() - 7*24*60*60)
+                    ->select()
+                    ->toArray();
+            $wxpay = new wxpayApi();
+            foreach ($payTrade as $v) {
+//                if($v['pay_type'] == 'wxpay') {
+//                    $result = $wxpay->closeOrder($v['pay_no']);
+//                }
+                (new PayTradeModel)->where("id",$v['id'])->where("status",0)->delete();
+            }
+            $mtime = microtime(true)*10000;
+            $payOn = "A".date("Ymd").$mtime .rand(1000,9000) . $request->user['uid'];
+            $out_trade_no="";
+            $payType  = $save["pay_type"];
+            //添加交易记录
+            $trade = [
+                'uid'      => $request->user['uid'],
+                'o_id'     => $o_id,
+                'order_id' =>$save["order_id"],
+                'pay_no'   => $payOn,
+                'out_trade_no' => empty($out_trade_no) ? $payOn : $out_trade_no,
+                'pay_type' => $payType,
+                'money'    => $payMoney,
+                'type'     => 'temp',
+                'd_json'   => serialize(['orderId'=>$save["order_id"],"give_score"=>0]),
+                'time'     => time(),
+                'status'   => 0,
+            ];
+            $r=(new PayTradeModel)->insert($trade);
+            if(!$r){
+                Db::rollback();
+                return app('json')->fail('支付信息获取失败!');
+            }
+            $clictip = get_client_ip();
+            if(empty($clictip)){
+                $clictip = $request->ip();
+            }
+            $payData =  $wxpay->wxmpPay([
+                'body'            => "微信小程序购买模板",
+                'out_trade_no'    => $payOn,
+                'total'           => $payMoney,
+                'openid'          => $request->user['openid'],
+                'payer_client_ip' => $clictip,
+            ]);
+            if(empty($payData)){
+                Db::rollback();
+                return app('json')->fail($wxpay->errorMsg);
+            }
+            Db::commit();
+            $redis->delete($key);
+            return app('json')->success([
+                'jsApiParameters'=> $payData,
+                'pay_no'         => $payOn,
+                'order_id'       => $save["order_id"],
+                "status"         => $save['status'],
+                "money"          => $payMoney,
+            ]);
+        } catch (DbException $db){
+            Db::rollback();
+            return app('json')->fail("订单生成失败");
+        }
+    }
+    /**
+     * 获取模板购买订单详情
+     * @param Request $request
+     */
+    public function payShowTemplateOrderInfo(Request $request){
+        [$order_id] = UtilService::getMore([
+            ['order_id','','empty','参数错误'],
+        ],$request,true);
+        $data = (new ShowTemplateOrder)
+                ->field("order_id,total_money,all_money,pay_money,status,time")
+                ->where("order_id",$order_id)
+                ->where("uid",$request->user["uid"])
+                ->find();
+        if(empty($data)){
+            return app('json')->fail('信息不存在!');
+        }
+        $data=$data->toArray();
+        if($data["status"]==0 && $data["time"]<time() - 30*60){
+            (new ShowTemplateOrder)->where("id",$data["id"])->where("uid",$request->user["uid"])->update(["status"=>-1]);
+            $data["status"]==-1;
+        }
+        $data["time"] = date("Y-m-d H:i:s",$data["time"]);
+        return app('json')->success($data);
+    }
+    
+    
    
     
     

+ 3 - 0
app/api/route/user.php

@@ -23,6 +23,9 @@ Route::group('user', function () {
     Route::rule('subInfoAudit', 'User/subInfoAudit');
     //资料申请审核2
     Route::rule('subTypeAudit', 'User/subTypeAudit');
+    //提交模板订单
+    Route::rule('subShowTemplateOrder', 'User/subShowTemplateOrder');
+ 
     //图片上传
     Route::rule('upload', 'User/upload');
     //视频上传

+ 14 - 0
app/model/api/ShowTemplateOrder.php

@@ -0,0 +1,14 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\model\api;
+
+use think\Model;
+
+/**
+ * @mixin \think\Model
+ */
+class ShowTemplateOrder extends Model
+{
+    //
+}

+ 7 - 7
composer.lock

@@ -3180,16 +3180,16 @@
         },
         {
             "name": "wechatpay/wechatpay",
-            "version": "1.4.5",
+            "version": "1.4.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/wechatpay-apiv3/wechatpay-php.git",
-                "reference": "43b05b3bd471c896781ae54250fbd460567c103a"
+                "reference": "fbe8d7c2b3b367e42bf98caa0cce582b3205d427"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/wechatpay-apiv3/wechatpay-php/zipball/43b05b3bd471c896781ae54250fbd460567c103a",
-                "reference": "43b05b3bd471c896781ae54250fbd460567c103a",
+                "url": "https://api.github.com/repos/wechatpay-apiv3/wechatpay-php/zipball/fbe8d7c2b3b367e42bf98caa0cce582b3205d427",
+                "reference": "fbe8d7c2b3b367e42bf98caa0cce582b3205d427",
                 "shasum": ""
             },
             "require": {
@@ -3241,9 +3241,9 @@
             ],
             "support": {
                 "issues": "https://github.com/wechatpay-apiv3/wechatpay-php/issues",
-                "source": "https://github.com/wechatpay-apiv3/wechatpay-php/tree/v1.4.5"
+                "source": "https://github.com/wechatpay-apiv3/wechatpay-php/tree/v1.4.8"
             },
-            "time": "2022-05-23T10:45:16+00:00"
+            "time": "2023-01-05T03:50:12+00:00"
         },
         {
             "name": "wechatpay/wechatpay-guzzle-middleware",
@@ -3620,5 +3620,5 @@
         "php": ">=7.1.0"
     },
     "platform-dev": [],
-    "plugin-api-version": "2.2.0"
+    "plugin-api-version": "2.3.0"
 }

+ 13 - 9
config/wxpay.php

@@ -4,13 +4,17 @@
 // +----------------------------------------------------------------------
 
 return [
-    'APPID'                => 'wx39fcf01fa06905354',//APPID
-    'APPSECRET'            => 'de9ba956e1e165c12435a73d1ae8f7c4c',//应用密钥
-    'MCHID'                => '16268171706',//商户号(操作密码701011)
-    'apiv3Key'             => '5a146ecbbe31f8c1942179dd5a0ef0a72',//APIv3Key用于加密文本消息解密(md5("hudielan_jiangweifeng_1011"))
-    'merchantSerialNumber' => '544DBA4F4873B1B928E88A0045D0266FF32BB4EA7',//商户API证书序列号
-    'certSerialNumber'     =>'530DF99182E311D78A00BB53236B3A68B357FE746',//生成证书序列号(一般没啥用)
-    'PrivateKey'           => "file://".app()->getRootPath().'config/wxpay/cert/apiclient_key.pem',// 商户私钥文件路径
-    'Certificate'          => "file://".app()->getRootPath().'config/wxpay/cert/wechatpay_530DF99182E31D78A00BB53236B3A68B357FE746.pem',// 微信支付 APIv3 平台证书
-    'NOTIFY_URL'           => 'https://api.myjie.cn/api/pay/wxpayNotify',//支付回调通知URL
+    'APPID'                => 'wx57a473fc2f83f7e5',//APPID
+    'APPSECRET'            => 'c1a852e43bb28ca6a72dd7bcebfcc434',//应用密钥
+    'MCHID'                => '1640972417',//商户号(操作密码558844)
+    'ApiV2Key'             => 'OUS0GDR7rebXWzxmmYgpseiYJLemdbO9',//APIv2Key用于加密文本消息解密(md5("hudielan_jiangweifeng_1011"))
+    'ApiclientKey'         => "file://".app()->getRootPath().'config/wxpay/cert/apiclient_key.pem',// 商户私钥文件路径
+    'ApiclientCert'        => "file://".app()->getRootPath().'config/wxpay/cert/apiclient_cert.pem',// 商户证书文件路径
+    'NOTIFY_URL'           => "https://api.myjie.cn/api/pay/wxpayNotify",//支付回调通知URL
+    
+//    'apiv3Key'             => '',//APIv3Key用于加密文本消息解密(md5("hudielan_jiangweifeng_1011"))
+//    'merchantSerialNumber' => '',//商户API证书序列号
+//    'certSerialNumber'     => '',//生成证书序列号(一般没啥用)
+//    'Certificate'          => "",// 微信支付 APIv3 平台证书
+    
 ];

BIN
config/wxpay/cert/apiclient_cert.p12


+ 20 - 19
config/wxpay/cert/apiclient_cert.pem

@@ -1,24 +1,25 @@
 -----BEGIN CERTIFICATE-----
-MIID8zCCAtugAwIBAgIUVE26T0hzu5KOiKAEXQJm/zK7TqcwDQYJKoZIhvcNAQEL
+MIIEKzCCAxOgAwIBAgIUKRumfIdhgoyrQMfewvKgSlffjNAwDQYJKoZIhvcNAQEL
 BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
 FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
-Q0EwHhcNMjIwNjA3MDYyODE3WhcNMjc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/P81oJuZ85t
+P6sUaOeMvQ4F1+l2ks1gNyiXo+K6470+qLi8U2ksfDQi5fxbc3//V+jpAoGAO8wL
+LHnPMF3nceRVmfcg8U5hogOvcHC/aX5z6qKUbYKndap2O8Dpb6yQc6XKVULjP0EG
+qKSn3HhA7hUnKnDg8irEFNghSLk+kF+c5VTVicRl7uFdsLmHS8hIXS1lkVPE2Zol
+zgBHMDFW3zbB3ctMzMsNs3GpXkRqZaun/c0i6e0CgYEA8xAX4pUQozZ5Vg7KrwQb
++VDsf2fZs/RFIFYebX3uPajBGHmtenOzG6bAYlP2H+lyYjymET5bQk5XQgJ9xbJj
+/uaTsQTHOTAAGUTHtM/vo2Wd+65HFGsG2+z+G3Zd/e4r3rXlDYA9vuaMzLpZFWXt
+NI/Pe2bYo1r4M387R60ct3A=
 -----END PRIVATE KEY-----

+ 0 - 23
config/wxpay/cert/wechatpay_530DF99182E31D78A00BB53236B3A68B357FE746.pem

@@ -1,23 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID3DCCAsSgAwIBAgIUUw35kYLjHXigC7UyNrOmizV/50YwDQYJKoZIhvcNAQEL
-BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
-FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
-Q0EwHhcNMjIwNjA3MDYyODE2WhcNMjcwNjA2MDYyODE2WjBuMRgwFgYDVQQDDA9U
-ZW5wYXkuY29tIHNpZ24xEzARBgNVBAoMClRlbnBheS5jb20xHTAbBgNVBAsMFFRl
-bnBheS5jb20gQ0EgQ2VudGVyMQswCQYDVQQGDAJDTjERMA8GA1UEBwwIU2hlblpo
-ZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQVzvhZJCc345gq9mF
-6SqWeYgFLz+9JKI18XjukmFcyTnKq3Cce1TrYXz4DWySe3K771MoblzcwEORffds
-N8KckyjNMa7S/7pjEguJ0D0jzG2bUE0VKokpG7Wo4ha94zfZBh63GXSLgJ0OE+5V
-lBqClLjAyJt2EKDSjXfoNFkyyZC1KB4loOX6VEgtkHCenkYc3UqOouvfralRHoWy
-R+Mg+HpFN/fEDd1D3ZeAweS2COP8YyhymbBRemHiKYi4fZOQwymIi7iOOxIfJY2I
-lS9zI+tALjP0AbZsYt1Td9qpLakjeltbtX0VaPqZtxH7ckx4DAH2+Ot3vHvNM4tb
-HGwZAgMBAAGjgYEwfzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE8DBlBgNVHR8EXjBc
-MFqgWKBWhlRodHRwOi8vZXZjYS5pdHJ1cy5jb20uY24vcHVibGljL2l0cnVzY3Js
-P0NBPTFCRDQyMjBFNTBEQkMwNEIwNkFEMzk3NTQ5ODQ2QzAxQzNFOEVCRDIwDQYJ
-KoZIhvcNAQELBQADggEBADsgRV1aex3UJi6jUHJl0jcdP8h+Rp7ZdoWf5MhZ7NB7
-9Px/YQHuup1DKM8xxE6lKlOKQiNnfUGuH/bKiSuLr3B5J6e18VpZq6l3WqF7uzC6
-hSw4qiJ4n9PV8JzfDZaWRu0h8Dd2cydf2703t2+/U5A3cce/bkSu1hXsAuWY0gOQ
-gQkLoJEtew9Eaf/tPBv5KXBeJaDD3GyiimhL1Fu33ljyww0CgVbI5kGS1hM0WA+I
-zpH1vRu0HaxsCZViBfW3PyEfBN6wlAUNqU/64OhJmUiC+kYW2NooKzXryPTzUOUa
-5p3+X35bGhmGIbX/xfcsQBkx9KlVn7O3KtPd0PCGru4=
------END CERTIFICATE-----

+ 245 - 0
library/utils/WxpayV2.php

@@ -0,0 +1,245 @@
+<?php
+// +----------------------------------------------------------------------
+// | [ WE CAN DO IT MORE SIMPLE  ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2018-2020 rights reserved.
+// +----------------------------------------------------------------------
+// | Author: YingZi
+// +----------------------------------------------------------------------
+// | Date: 2022-05-27 15:14
+// +----------------------------------------------------------------------
+declare (strict_types = 1);
+namespace library\utils;
+use WeChatPay\Builder;
+use WeChatPay\Formatter;
+use WeChatPay\Crypto\Rsa;
+use WeChatPay\Crypto\AesGcm;
+use WeChatPay\Crypto\Hash;
+use WeChatPay\Util\PemUtil;
+use WeChatPay\Transformer;
+
+
+class WxpayV2{
+    private $config;
+    private $client;
+    private $errorMsg;
+    /**
+     * 构造函数
+     * @param type $config
+     */
+    public function __construct($config = []){
+        if(empty($config)) $config = config('wxpay');
+        $this->config = $config;
+        // 工厂方法构造一个实例
+        $this->client = Builder::factory([
+            'mchid'      => $this->config["MCHID"],
+            'serial'     => 'nop',
+            'privateKey' => 'any',
+            'certs'      => ['any' => null],
+            'secret'     => $this->config["ApiV2Key"],
+            'merchant' => [
+                'cert' => $this->config["ApiclientCert"],
+                'key'  => $this->config["ApiclientKey"],
+            ],
+        ]);
+    }
+    public function wxNotify(){
+        var_dump(Transformer::toArray($request->getInput()));
+    }
+    public function wxmpPay($post=[]){
+        $apiUrl = "v2/pay/unifiedorder";
+        //sign_type默认MD5不用传
+        $params = [
+            'appid'            => $this->config["APPID"], // 小程序ID/微信开放平台审核通过的应用APPID
+            'mch_id'           => $this->config["MCHID"], // 商户号
+            'nonce_str'        => Formatter::nonce(), // 32位随机字符串
+            'body'             => empty($post["body"])  ? "微信小程序支付" : $post["body"],
+            'attach'           => empty($post["attach"])? "微信小程序支付" : $post["attach"],
+            'out_trade_no'     => $post["out_trade_no"], // 商户订单号
+            'total_fee'        => (int)(floatval($post["total"])*100), // 订单总金额,单位分
+            'spbill_create_ip' => empty($post["payer_client_ip"]) ? "127.0.0.1" : $post["payer_client_ip"], // 终端ip
+            'time_expire'      => date("YmdHis",time()+30*60),//交易结束时间2018-06-08T10:34:56+08:00
+            'notify_url'       => $this->config["NOTIFY_URL"], // 通知地址
+            'trade_type'       => "JSAPI", // 交易类型
+            'openid'           => $post["openid"],
+            'signType'         => ALGO_MD5,
+        ];
+//        $params["sign"] = self::getSign($params);
+        $result = $this->clientHttp("POST", $apiUrl, $params);
+        if(empty($result)){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误001";
+            }
+            return false;
+        }
+        $resuleAr = Transformer::toArray($result);
+        if(empty($resuleAr)){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误002";
+            }
+            return false;
+        }
+        if(empty($resuleAr["prepay_id"])){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误003";
+            }
+            return false;
+        }
+        //组装支付参数
+        $payInfo=array();
+        $data=$this->v2makeSign(["appId"=>$this->config["APPID"],"prepay_id"=>$resuleAr["prepay_id"]]);
+        $data["payData"] = $params;
+        return $data;
+    }
+    
+    public function v2makeSign($info){
+        $params = [
+            'appId'     => $info["appId"],
+            'timeStamp' => (string)Formatter::timestamp(),
+            'nonceStr'  => Formatter::nonce(),
+            'package'   => 'prepay_id='.$info["prepay_id"],
+        ];
+        $params['paySign'] = Hash::sign(
+            Hash::ALGO_MD5,//默认md5
+            Formatter::queryStringLike(Formatter::ksort($params)),
+            $this->config["ApiV2Key"],
+        );
+        $params['signType'] = ALGO_MD5;
+        return $params;
+    }
+    
+    /**
+     * 查询订单
+     * @param type $out_trade_no 商户订单号
+     */
+    public function searchOrder($out_trade_no){
+        $apiUrl = "v3/pay/transactions/out-trade-no/{out_trade_no}";
+        $result = $this->clientHttp("GET", $apiUrl,[
+            "out_trade_no"=>$out_trade_no,
+            "query"=>["mchid"=>$this->config["MCHID"]],
+        ]);
+        return $result;
+    }
+    /**
+     * 关闭订单
+     * @param type $out_trade_no 商户订单号
+     */
+    public function closeOrder($out_trade_no){
+        $apiUrl = "v3/pay/transactions/out-trade-no/{out_trade_no}/close";
+        $result = $this->clientHttp("GET", $apiUrl,[
+            "out_trade_no"=>$out_trade_no,
+            "query"=>["mchid"=>$this->config["MCHID"]],
+        ]);
+        return $result;
+    }
+    /**
+     * 生成签名
+     * @param type $info
+     * @return string
+     */
+    private function makeSign($info){
+        $params = [
+            'appId'     => $info["appId"],
+            'timeStamp' => (string)Formatter::timestamp(),
+            'nonceStr'  => Formatter::nonce(),
+            'package'   => 'prepay_id='.$info["prepay_id"],
+        ];
+        $params["paySign"] = Rsa::sign(Formatter::joinedByLineFeed(...array_values($params)),$this->merchantPrivateKeyInstance);
+        $params["signType"] = 'RSA';
+        return $params;
+    }
+    /**
+     * 解密回调参数
+     * @param type $data
+     * @return type
+     */
+    public function aesGcmDecrypt($data){
+        // 加密文本消息解密
+        $inBodyResource = AesGcm::decrypt($data["ciphertext"], $this->config["apiv3Key"], $data["nonce"], $data["associated_data"]);
+        // 把解密后的文本转换为PHP Array数组
+        $inBodyResourceArray = (array)json_decode($inBodyResource, true);
+        return $inBodyResourceArray;
+    }
+    /**
+     * http提交[同步请求]
+     * @param type $type
+     * @param type $url 示例:v3/pay/transactions/native
+     * @param type $json
+     * @return boolean
+     */
+    private function clientHttp($type='POST',$url='',$json=[]){
+        try {
+            $resp=null;
+            if($type=="POST"){
+                $resp = $this->client->chain($url)->post(['xml' => $json]);
+                if(empty($json)){
+                    $resp = $this->client->chain($url)->post();
+                }else{
+                    $resp = $this->client->chain($url)->post(['xml' => $json]);
+                }
+            }
+            if($type=="GET"){
+                if(empty($json)){
+                    $resp = $this->client->chain($url)->get();
+                }else{
+                    $resp = $this->client->chain($url)->get($json);
+                }
+            }
+            if(empty($resp)){
+                $this->errorMsg="提交方式错误";
+                return false;
+            }
+            $statusCode =  $resp->getStatusCode();
+            if ($statusCode == 200) { //处理成功
+                return $resp->getBody()->getContents();
+            } else if ($statusCode == 204) { //处理成功,无返回Body
+                $this->errorMsg = "处理成功,无返回Body";
+                return false;
+            }else{
+                $this->errorMsg = "未知错误";
+                return false;
+            }
+        } catch (\Exception $e) {
+//            var_dump($e->getMessage());
+            // 进行错误处理
+            $this->errorMsg =  $e->getMessage();
+            if ($e instanceof \GuzzleHttp\Exception\RequestException && $e->hasResponse()) {
+                $r = $e->getResponse();
+                $this->errorMsg=$r->getStatusCode()."".$r->getReasonPhrase().$r->getBody();
+            }
+            return false;
+        }
+    }
+    
+    //回调验签
+    public function cesiCheckSign(){
+        $inBody = '';// 请根据实际情况获取,例如: file_get_contents('php://input');
+
+$apiv2Key = '';// 在商户平台上设置的APIv2密钥
+
+$inBodyArray = Transformer::toArray($inBody);
+
+// 部分通知体无`sign_type`,部分`sign_type`默认为`MD5`,部分`sign_type`默认为`HMAC-SHA256`
+// 部分通知无`sign`字典
+// 请根据官方开发文档确定
+['sign_type' => $signType, 'sign' => $sign] = $inBodyArray;
+
+$calculated = Hash::sign(
+    $signType ?? Hash::ALGO_MD5,// 如没获取到`sign_type`,假定默认为`MD5`
+    Formatter::queryStringLike(Formatter::ksort($inBodyArray)),
+    $apiv2Key
+);
+
+$signatureStatus = Hash::equals($calculated, $sign);
+
+if ($signatureStatus) {
+    // 如需要解密的
+    ['req_info' => $reqInfo] = $inBodyArray;
+    $inBodyReqInfoXml = AesEcb::decrypt($reqInfo, Hash::md5($apiv2Key));
+    $inBodyReqInfoArray = Transformer::toArray($inBodyReqInfoXml);
+    // print_r($inBodyReqInfoArray);// 打印解密后的结果
+}
+    }
+}
+ 
+

+ 424 - 0
library/utils/qnWxPay.php

@@ -0,0 +1,424 @@
+<?php
+/**
+ * 微信支付
+ * Created by PhpStorm.
+ * User: phperstar
+ * Date: 2019/11/28
+ * Time: 2:12 PM
+ */
+namespace Util\WeiXin;
+
+
+class QnWxPay
+{
+    /**
+     * 小程序 appId
+     * @var string $appid
+     */
+    private $appid;
+    /**
+     * 商户号
+     * @var string $mch_id
+     */
+    private $mch_id;
+
+    /**
+     * 商户支付密钥
+     */
+    private $partnerKey;
+
+    /**
+     * 微信支付异步通知地址
+     */
+    private $notifyUrl = PAY_NOTIFY_URL.'/common/WeiXinPayNotify/notify';
+
+    /**
+     * 公共的接口请求地址
+     * @var string
+     */
+    private $apiUrl = 'https://api.mch.weixin.qq.com/pay/';
+
+    /**
+     * 基础得请求地址
+     */
+     private $baseUrl = 'https://api.mch.weixin.qq.com/';
+     
+     
+     private $config;
+
+    /**
+     * Pay constructor.
+     * @param string $appid
+     * @param $mch_id
+     * @param $partnerKey
+     */
+    public function __construct($appid='', $mch_id, $partnerKey)
+    {
+        $this->appid = $appid;
+        $this->mch_id = $mch_id;
+        $this->partnerKey = $partnerKey;
+        if(empty($config)) $config = config('wxpay');
+        $this->config = $config;
+    }
+    
+    public function wxmpPay($post=[]){
+        $url = $this->apiUrl.'unifiedorder';
+        $params = [
+            'appid'            => $this->config["APPID"], // 小程序ID/微信开放平台审核通过的应用APPID
+            'mch_id'           => $this->config["MCHID"], // 商户号
+            'nonce_str'        => md5(md5(time().randString(10))), // 32位随机字符串
+            'out_trade_no'     => $post["out_trade_no"], // 商户订单号
+            'total_fee'        => (int)(floatval($post["total"])*100), // 订单总金额,单位分
+            'spbill_create_ip' => empty($post["payer_client_ip"])?"127.0.0.1":$post["payer_client_ip"], // 终端ip
+            'trade_type'       => "JSAPI", // 交易类型
+            'notify_url'       => $this->config["NOTIFY_URL"], // 通知地址
+            'body'             => empty($post["body"])  ?"微信小程序支付":$post["body"],
+            'attach'           => empty($post["attach"])?"微信小程序支付":$post["attach"],
+            'openid'           => $post["openid"],
+        ];
+        $params["sign"] = self::getSign($params);
+//        $post_xml = $this->arrayToWeiXinXml($params);
+        $curl_content = request($url, $post_xml);
+    }
+
+    /**
+     * 统一下单接口
+     */
+    public function unifiedorder($orderNo, $total_fee, $ip, $source, $shopName, $openid = '', $attach = '')
+    {
+        $url = $this->apiUrl.'unifiedorder';
+
+        switch ($source){
+            case 'H5':
+                $trade_type = 'MWEB';
+                break;
+            case 'APP':
+                $trade_type = 'APP';
+                break;
+            default:
+                $trade_type = 'JSAPI';
+                break;
+        }
+
+        $params = [
+            'appid'  => $this->appid, // 小程序ID/微信开放平台审核通过的应用APPID
+            'mch_id' => $this->mch_id, // 商户号
+            'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+            'out_trade_no' => $orderNo, // 商户订单号
+            'total_fee'  => yuanToFen($total_fee), // 订单总金额,单位分
+            'spbill_create_ip' => $ip, // 终端ip
+            'trade_type' => $trade_type, // 交易类型
+            'notify_url' => $this->notifyUrl, // 通知地址
+            'body'  => $shopName.'-'.'线上商城',
+            'attach' => $attach, // 附加数据
+        ];
+        if($trade_type == 'JSAPI'){
+            $params['openid'] = $openid;
+        }
+
+        $params['sign'] = self::getSign($params);
+        $post_xml = $this->arrayToWeiXinXml($params);
+        $curl_content = request($url, $post_xml);
+
+        $result = $this->commonResult($curl_content);
+        if(!$result->isSuccess()){
+            return ResultWrapper::fail($result->getData(), $result->getErrorCode());
+        }
+        $response_content = $result->getData();
+
+        //获取统一下单返回的id
+        $prepay_id = $response_content['prepay_id'];
+
+        // H5支付返回的支付跳转链接
+        $mweb_url = isset($response_content['mweb_url']) ? $response_content['mweb_url'] : '';
+
+        switch ($source){
+            case 'byteDanceH5':
+                $payParams = $mweb_url;  // 字节跳动小程序调用微信H5支付获取支付链接
+                break;
+            case 'H5':
+                $payParams =  self::payment($prepay_id);
+                break;
+            case 'APP':
+                $payParams =  self::payment($prepay_id);
+                break;
+            default:
+                $payParams =  self::paymentToMinprogram($prepay_id);
+                break;
+        }
+
+        return ResultWrapper::success($payParams);
+    }
+
+
+    /**
+     * 小程序调起支付用到的参数
+     * 官方接口地址: https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=3
+     */
+    public function paymentToMinprogram($prepay_id)
+    {
+        unset($params);
+        $params = [
+            'appId' => $this->appid, // 小程序ID
+            'timeStamp' => (string)time(), //时间戳
+            'nonceStr' => md5(md5(time().'qianniao.vip')), //32位随机字符串
+            'package'  => 'prepay_id='.$prepay_id, // 数据包
+            'signType' => 'MD5', // 签名方式
+        ];
+        $params['paySign'] = self::getSign($params);
+        return $params;
+    }
+
+    /**
+     * 调起支付用到的参数
+     * 官方接口地址: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_12
+     * @param $prepay_id
+     */
+    public function payment($prepay_id)
+    {
+        unset($parm);
+        $parm = array(
+            'appid' => $this->appid,
+            'partnerid' => $this->mch_id,
+            'timestamp' => (string)time(), //时间戳
+            'noncestr' => md5(md5(time().'qianniao.vip')), //32位随机字符串
+            'prepayid' => $prepay_id, //统一下单接口返回的prepay_id 参数值
+            'package' => 'Sign=WXPay',
+        );
+        $parm['sign'] = self::getSign($parm);
+        return $parm;
+    }
+
+    /**
+     * 付款码支付
+     * 官方文档地址: https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1
+     */
+    public function micropay($orderNo, $total_fee, $ip, $shopName, $auth_code)
+    {
+        $url = $this->apiUrl.'micropay';
+
+        $params = [
+            'appid'  => $this->appid, // 小程序ID/微信开放平台审核通过的应用APPID
+            'mch_id' => $this->mch_id, // 商户号
+            'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+            'body'  => $shopName.'-'.'线上商城',
+            'out_trade_no' => $orderNo, // 商户订单号
+            'total_fee'  => yuanToFen($total_fee), // 订单总金额,单位分
+            'spbill_create_ip' => $ip, // 终端ip
+            'auth_code' => $auth_code,
+        ];
+        $params['sign'] = self::getSign($params);
+        $post_xml = $this->arrayToWeiXinXml($params);
+        $curl_content = request($url, $post_xml);
+
+        if($curl_content['httpcode'] != '200'){
+            return ResultWrapper::fail($curl_content['errorMsg'], ErrorCode::$apiNotResult);
+        }
+
+        $response_content = (array)simplexml_load_string($curl_content['content'], 'SimpleXMLElement', LIBXML_NOCDATA);
+            if($response_content['return_code'] != 'SUCCESS'){
+            return ResultWrapper::fail($response_content['return_msg'], ErrorCode::$weixinPayError);
+        }
+
+        if($response_content['result_code'] != 'SUCCESS' && $response_content['err_code'] != 'USERPAYING' ){
+            return ResultWrapper::fail($response_content['err_code_des'], ErrorCode::$weixinPayError);
+        }
+
+        // 20s内查询支付状态,如果有明确错误直接返回错误,其他情况继续查询。如果成功直接返回成功
+        for($i=1; $i<=10; $i++)
+        {
+            $url = $this->apiUrl.'orderquery';
+            $params = [
+                'appid'  => $this->appid, // 小程序ID/微信开放平台审核通过的应用APPID
+                'mch_id' => $this->mch_id, // 商户号
+                'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+                'out_trade_no' => $orderNo, // 商户订单号
+            ];
+
+            $params['sign'] = self::getSign($params);
+            $post_xml = $this->arrayToWeiXinXml($params);
+            $curl_content = request($url, $post_xml);
+
+            if($curl_content['httpcode'] != '200'){
+                return ResultWrapper::fail($curl_content['errorMsg'], ErrorCode::$apiNotResult);
+            }
+
+            $response_content = (array)simplexml_load_string($curl_content['content'], 'SimpleXMLElement', LIBXML_NOCDATA);
+            if($response_content['return_code'] != 'SUCCESS'){
+                return ResultWrapper::fail($response_content['return_msg'], ErrorCode::$weixinPayError);
+            }
+
+            if($response_content['result_code'] != 'SUCCESS' && $response_content['err_code'] == 'ORDERNOTEXIST'){
+                return ResultWrapper::fail($response_content['err_code_des'], ErrorCode::$weixinPayError);
+            }
+
+            if($response_content['return_code'] == 'SUCCESS' &&  $response_content['result_code'] == 'SUCCESS' && $response_content['trade_state'] == 'SUCCESS'){
+                return ResultWrapper::success($response_content['trade_state']);
+            }
+
+            sleep(2);
+        }
+
+        // 20s内没有支付则撤销订单
+        for($i=1; $i<=10; $i++){
+            $url = $this->baseUrl.'secapi/pay/reverse';
+            $params = [
+                'appid'  => $this->appid, // 小程序ID/微信开放平台审核通过的应用APPID
+                'mch_id' => $this->mch_id, // 商户号
+                'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+                'out_trade_no' => $orderNo, // 商户订单号
+            ];
+
+            $params['sign'] = self::getSign($params);
+            $post_xml = $this->arrayToWeiXinXml($params);
+            $curl_content = request($url, $post_xml, 10, false, [], true);
+
+            if($curl_content['httpcode'] != '200'){
+                return ResultWrapper::fail($curl_content['errorMsg'], ErrorCode::$apiNotResult);
+            }
+            $response_content = (array)simplexml_load_string($curl_content['content'], 'SimpleXMLElement', LIBXML_NOCDATA);
+            if($response_content['return_code'] != 'SUCCESS'){
+                return ResultWrapper::fail($response_content['return_msg'], ErrorCode::$weixinPayError);
+            }
+
+            if($response_content['result_code'] != 'SUCCESS' && $response_content['recall'] == 'N'){
+                return ResultWrapper::fail($response_content['err_code_des'], ErrorCode::$weixinPayError);
+            }
+
+            if($response_content['return_code'] == 'SUCCESS' &&  $response_content['result_code'] == 'SUCCESS' && $response_content['recall'] == 'N'){
+                return ResultWrapper::success($response_content['result_code']);
+            }
+        }
+
+    }
+
+
+    /**
+     * H5查询支付状态接口
+     */
+    public function orderquery($orderNo)
+    {
+        $url = $this->apiUrl.'orderquery';
+        $params = [
+            'appid'  => $this->appid, // 小程序ID/微信开放平台审核通过的应用APPID
+            'mch_id' => $this->mch_id, // 商户号
+            'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+            'out_trade_no' => $orderNo, // 商户订单号
+        ];
+
+        $params['sign'] = self::getSign($params);
+        $post_xml = $this->arrayToWeiXinXml($params);
+        $curl_content = request($url, $post_xml);
+
+        $result = $this->commonResult($curl_content);
+        if(!$result->isSuccess()){
+            return ResultWrapper::fail($result->getData(), $result->getErrorCode());
+        }
+        $response_content = $result->getData();
+
+        $trade_state = $response_content['trade_state'];
+
+        return ResultWrapper::success($trade_state);
+    }
+
+    /**
+     * 申请退款API
+     * 官方文档地址:https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_4
+     */
+    public function transfers($outerTradeNo, $out_refund_no, $refundMoney, $orderMoney, $sslData)
+    {
+        $url = $this->baseUrl.'secapi/pay/refund';
+        $params = [
+            'appid'  => $this->appid,
+            'mch_id' => $this->mch_id,
+            'nonce_str' => md5(md5(time().'qianniao.vip')), // 32位随机字符串
+            'transaction_id' => $outerTradeNo, // 微信交易号
+            'out_refund_no'  => $out_refund_no, // 商户退款单号
+            'refund_fee' => yuanToFen($refundMoney), // 退款金额
+            'total_fee'  => yuanToFen($orderMoney),  // 订单总金额
+        ];
+
+        $params['sign'] = self::getSign($params);
+        $post_xml = $this->arrayToWeiXinXml($params);
+        $curl_content = request($url, $post_xml, 10, false, [], true, $sslData);
+
+        $result = $this->commonResult($curl_content);
+        if(!$result->isSuccess()){
+            return ResultWrapper::fail($result->getData(), $result->getErrorCode());
+        }
+        $response_content = $result->getData();
+
+        return ResultWrapper::success($response_content['refund_id']);
+    }
+
+    /**
+     * 公共处理返回结果方法
+     */
+    public function commonResult($curl_content)
+    {
+        if($curl_content['httpcode'] == '200'){
+            $response_content = (array)simplexml_load_string($curl_content['content'], 'SimpleXMLElement', LIBXML_NOCDATA);
+            if($response_content['return_code'] == 'SUCCESS'){
+                if($response_content['result_code'] == 'SUCCESS'){
+                    return ResultWrapper::success($response_content);
+                }else{
+                    return ResultWrapper::fail($response_content['err_code_des'], ErrorCode::$weixinPayError);
+                }
+            }else{
+                return ResultWrapper::fail($response_content['return_msg'], ErrorCode::$weixinPayError);
+            }
+        }else{
+            return ResultWrapper::fail($curl_content['errorMsg'], ErrorCode::$apiNotResult);
+        }
+    }
+
+    /**
+     * 生成签名方法
+     * 官方接口地址: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=4_3
+     * 官方签名测试地址: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=20_1
+     * @param $parm
+     * @return string
+     */
+    public function getSign($parm)
+    {
+        //非空参数值的参数按照参数名ASCII码从小到大排序(字典序)
+        if(ksort($parm)){
+            $stringA = '';
+            //使用URL键值对的格式拼接成字符串stringA
+            foreach($parm as $key => $value){
+                if($value == 0 || !empty($value)){
+                    $stringA .=$key.'='.$value.'&';
+                }
+            }
+        }else{
+            echo "对参数排序出错";
+            exit();
+        }
+
+        //在stringA最后拼接上key=商户支付密钥
+        $stringSignTemp = $stringA.'key='.$this->config["ApiV2Key"];
+
+        //对stringSignTemp进行MD5运算,再将得到的字符串所有字符转换为大写
+        $signValue = strtoupper(md5($stringSignTemp));
+        return $signValue;
+    }
+    
+    
+    
+    
+    //数组转xml
+    public function arrayToWeiXinXml($arr)
+    {
+        $xml = '<xml>';
+        foreach($arr as $key => $value){
+            if (is_string($value)) {
+                $xml .= '<' . $key . '><![CDATA[' . $value . ']]></' . $key . '>';
+            } else {
+                $xml .= '<' . $key . '>' . $value . '</' . $key . '>';
+            }
+        }
+        $xml .='</xml>';
+        return $xml;
+    }
+
+}

+ 204 - 0
library/utils/weixinPayV2Old.php

@@ -0,0 +1,204 @@
+<?php
+// +----------------------------------------------------------------------
+// | [ WE CAN DO IT MORE SIMPLE  ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2018-2020 rights reserved.
+// +----------------------------------------------------------------------
+// | Author: YingZi
+// +----------------------------------------------------------------------
+// | Date: 2022-05-27 15:14
+// +----------------------------------------------------------------------
+declare (strict_types = 1);
+namespace library\utils;
+use WeChatPay\Builder;
+use WeChatPay\Formatter;
+use WeChatPay\Transformer;
+use WeChatPay\Crypto\Hash;
+use WeChatPay\Crypto\AesEcb;
+use WeChatPay\Crypto\Rsa;
+use WeChatPay\Crypto\AesGcm;
+
+use WeChatPay\Util\PemUtil;
+use WeChatPay\Request\WeChatPayTradeOutTradeNoQueryRequest;
+
+class weixinPayV2{
+    private $config;
+    private $client;
+    public  $errorMsg="系统错误";
+    private $merchantPrivateKeyInstance="";
+    /**
+     * 构造函数
+     * @param type $config
+     */
+    public function __construct($config = [])
+    {
+        if(empty($config)) $config = config('wxpay');
+        $this->config = $config;
+        $instance = Builder::factory([
+            'mchid'      => $this->config["MCHID"],
+            'serial'     => 'nop',//商户证书序列号,不使用APIv3可填任意值
+            'privateKey' => 'any',//商户API私钥,不使用APIv3可填任意值
+            'certs'      => ['any' => null],//不使用APIv3可填任意值
+            'secret'     => $this->config["ApiV2Key"],
+            'merchant' => [
+                'cert' => $this->config["ApiclientCert"],
+                'key'  => $this->config["ApiclientKey"],
+            ],
+        ]);
+        $this->client = $instance;
+    }
+    /**
+     * 微信小程序支付
+     * @param type $post
+     */
+    public function wxmpPay($post=[]){
+        $apiUrl = "pay/unifiedorder";
+        $jsonData = [];
+        //商户信息
+        $jsonData["appid"] = $this->config["APPID"];
+        $jsonData["mchid"] = $this->config["MCHID"];
+        $jsonData["notify_url"] = $this->config["NOTIFY_URL"];
+        //必填参数
+        $jsonData["description"]  = $post["description"];//描述
+        $jsonData["out_trade_no"] = $post["out_trade_no"];//商户订单号
+        $jsonData["amount"] = [
+            "total"=> (int)(floatval($post["total"])*100),//订单金额,分
+            "currency" => 'CNY'
+        ];
+        $jsonData["scene_info"] = [//支付场景描述
+            "payer_client_ip"=>empty($post["payer_client_ip"])?"127.0.0.1":$post["payer_client_ip"],//客户端IP
+        ];
+        $jsonData["time_expire"] = date("Y-m-d\TH:i:s+08:00",time()+30*60);//交易结束时间2018-06-08T10:34:56+08:00
+        $jsonData["payer"]=[
+            "openid"=>$post["openid"]
+        ];
+        $result = $this->clientHttp("POST", $apiUrl, $jsonData);
+        if(empty($result)){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误001";
+            }
+            return false;
+        }
+        $resuleAr = json_decode($result,true);
+        if(empty($resuleAr)){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误002";
+            }
+            return false;
+        }
+        if(empty($resuleAr["prepay_id"])){
+            if(empty($this->errorMsg)){
+                $this->errorMsg = "支付错误003";
+            }
+            return false;
+        }
+        //组装支付参数
+        $payInfo=array();
+        $data=$this->makeSign(["appId"=>$this->config["APPID"],"prepay_id"=>$resuleAr["prepay_id"]]);
+        $data["payData"] = $jsonData;
+        return $data;
+    }
+    /**
+     * 查询订单
+     * @param type $out_trade_no 商户订单号
+     */
+    public function searchOrder($out_trade_no){
+        $apiUrl = "v3/pay/transactions/out-trade-no/{out_trade_no}";
+        $result = $this->clientHttp("GET", $apiUrl,[
+            "out_trade_no"=>$out_trade_no,
+            "query"=>["mchid"=>$this->config["MCHID"]],
+        ]);
+        return $result;
+    }
+    /**
+     * 关闭订单
+     * @param type $out_trade_no 商户订单号
+     */
+    public function closeOrder($out_trade_no){
+        $apiUrl = "v3/pay/transactions/out-trade-no/{out_trade_no}/close";
+        $result = $this->clientHttp("GET", $apiUrl,[
+            "out_trade_no"=>$out_trade_no,
+            "query"=>["mchid"=>$this->config["MCHID"]],
+        ]);
+        return $result;
+    }
+    /**
+     * 生成签名
+     * @param type $info
+     * @return string
+     */
+    private function makeSign($info){
+        $params = [
+            'appId'     => $info["appId"],
+            'timeStamp' => (string)Formatter::timestamp(),
+            'nonceStr'  => Formatter::nonce(),
+            'package'   => 'prepay_id='.$info["prepay_id"],
+        ];
+        $params["paySign"] = Rsa::sign(Formatter::joinedByLineFeed(...array_values($params)),$this->merchantPrivateKeyInstance);
+        $params["signType"] = 'RSA';
+        return $params;
+    }
+    /**
+     * 解密回调参数
+     * @param type $data
+     * @return type
+     */
+    public function aesGcmDecrypt($data){
+        // 加密文本消息解密
+        $inBodyResource = AesGcm::decrypt($data["ciphertext"], $this->config["apiv3Key"], $data["nonce"], $data["associated_data"]);
+        // 把解密后的文本转换为PHP Array数组
+        $inBodyResourceArray = (array)json_decode($inBodyResource, true);
+        return $inBodyResourceArray;
+    }
+    /**
+     * http提交[同步请求]
+     * @param type $type
+     * @param type $url 示例:v3/pay/transactions/native
+     * @param type $json
+     * @return boolean
+     */
+    private function clientHttp($type='POST',$url='',$json=[]){
+        try {
+            $resp=null;
+            if($type=="POST"){
+                $resp = $this->client->chain($url)->post(['json' => $json]);
+                if(empty($json)){
+                    $resp = $this->client->chain($url)->post();
+                }else{
+                    $resp = $this->client->chain($url)->post(['json' => $json]);
+                }
+            }
+            if($type=="GET"){
+                if(empty($json)){
+                    $resp = $this->client->chain($url)->get();
+                }else{
+                    $resp = $this->client->chain($url)->get($json);
+                }
+            }
+            if(empty($resp)){
+                $this->errorMsg="提交方式错误";
+                return false;
+            }
+            $statusCode =  $resp->getStatusCode();
+            if ($statusCode == 200) { //处理成功
+                return $resp->getBody()->getContents();
+            } else if ($statusCode == 204) { //处理成功,无返回Body
+                $this->errorMsg = "处理成功,无返回Body";
+                return false;
+            }else{
+                $this->errorMsg = "未知错误";
+                return false;
+            }
+        } catch (\Exception $e) {
+            // 进行错误处理
+            $this->errorMsg =  $e->getMessage();
+            if ($e instanceof \GuzzleHttp\Exception\RequestException && $e->hasResponse()) {
+                $r = $e->getResponse();
+                $this->errorMsg=$r->getStatusCode()."".$r->getReasonPhrase().$r->getBody();
+            }
+            return false;
+        }
+    }
+    
+}
+

+ 18 - 0
vendor/autoload.php

@@ -2,6 +2,24 @@
 
 // autoload.php @generated by Composer
 
+if (PHP_VERSION_ID < 50600) {
+    if (!headers_sent()) {
+        header('HTTP/1.1 500 Internal Server Error');
+    }
+    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+    if (!ini_get('display_errors')) {
+        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+            fwrite(STDERR, $err);
+        } elseif (!headers_sent()) {
+            echo $err;
+        }
+    }
+    trigger_error(
+        $err,
+        E_USER_ERROR
+    );
+}
+
 require_once __DIR__ . '/composer/autoload_real.php';
 
 return ComposerAutoloaderInit3435f7237df0603bb67e4c0c8c5cd54f::getLoader();

+ 117 - 11
vendor/bin/CertificateDownloader.php

@@ -1,14 +1,120 @@
-#!/usr/bin/env sh
+#!/usr/bin/env php
+<?php
 
-dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../wechatpay/wechatpay-guzzle-middleware/tool" && pwd)
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../wechatpay/wechatpay/bin/CertificateDownloader.php)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
 
-if [ -d /proc/cygdrive ]; then
-    case $(which php) in
-        $(readlink -n /proc/cygdrive)/*)
-            # We are in Cygwin using Windows php, so the path must be translated
-            dir=$(cygpath -m "$dir");
-            ;;
-    esac
-fi
+namespace Composer;
 
-"${dir}/CertificateDownloader.php" "$@"
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+    if (!class_exists('Composer\BinProxyWrapper')) {
+        /**
+         * @internal
+         */
+        final class BinProxyWrapper
+        {
+            private $handle;
+            private $position;
+            private $realpath;
+
+            public function stream_open($path, $mode, $options, &$opened_path)
+            {
+                // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+                $opened_path = substr($path, 17);
+                $this->realpath = realpath($opened_path) ?: $opened_path;
+                $opened_path = $this->realpath;
+                $this->handle = fopen($this->realpath, $mode);
+                $this->position = 0;
+
+                return (bool) $this->handle;
+            }
+
+            public function stream_read($count)
+            {
+                $data = fread($this->handle, $count);
+
+                if ($this->position === 0) {
+                    $data = preg_replace('{^#!.*\r?\n}', '', $data);
+                }
+
+                $this->position += strlen($data);
+
+                return $data;
+            }
+
+            public function stream_cast($castAs)
+            {
+                return $this->handle;
+            }
+
+            public function stream_close()
+            {
+                fclose($this->handle);
+            }
+
+            public function stream_lock($operation)
+            {
+                return $operation ? flock($this->handle, $operation) : true;
+            }
+
+            public function stream_seek($offset, $whence)
+            {
+                if (0 === fseek($this->handle, $offset, $whence)) {
+                    $this->position = ftell($this->handle);
+                    return true;
+                }
+
+                return false;
+            }
+
+            public function stream_tell()
+            {
+                return $this->position;
+            }
+
+            public function stream_eof()
+            {
+                return feof($this->handle);
+            }
+
+            public function stream_stat()
+            {
+                return array();
+            }
+
+            public function stream_set_option($option, $arg1, $arg2)
+            {
+                return true;
+            }
+
+            public function url_stat($path, $flags)
+            {
+                $path = substr($path, 17);
+                if (file_exists($path)) {
+                    return stat($path);
+                }
+
+                return false;
+            }
+        }
+    }
+
+    if (
+        (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+        || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+    ) {
+        include("phpvfscomposer://" . __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php');
+        exit(0);
+    }
+}
+
+include __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php';

+ 2 - 1
vendor/bin/CertificateDownloader.php.bat

@@ -1,4 +1,5 @@
 @ECHO OFF
 setlocal DISABLEDELAYEDEXPANSION
-SET BIN_TARGET=%~dp0/../wechatpay/wechatpay-guzzle-middleware/tool/CertificateDownloader.php
+SET BIN_TARGET=%~dp0/CertificateDownloader.php
+SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
 php "%BIN_TARGET%" %*

+ 27 - 14
vendor/composer/ClassLoader.php

@@ -42,6 +42,9 @@ namespace Composer\Autoload;
  */
 class ClassLoader
 {
+    /** @var \Closure(string):void */
+    private static $includeFile;
+
     /** @var ?string */
     private $vendorDir;
 
@@ -106,6 +109,7 @@ class ClassLoader
     public function __construct($vendorDir = null)
     {
         $this->vendorDir = $vendorDir;
+        self::initializeIncludeClosure();
     }
 
     /**
@@ -425,7 +429,8 @@ class ClassLoader
     public function loadClass($class)
     {
         if ($file = $this->findFile($class)) {
-            includeFile($file);
+            $includeFile = self::$includeFile;
+            $includeFile($file);
 
             return true;
         }
@@ -555,18 +560,26 @@ class ClassLoader
 
         return false;
     }
-}
 
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- *
- * @param  string $file
- * @return void
- * @private
- */
-function includeFile($file)
-{
-    include $file;
+    /**
+     * @return void
+     */
+    private static function initializeIncludeClosure()
+    {
+        if (self::$includeFile !== null) {
+            return;
+        }
+
+        /**
+         * Scope isolated include.
+         *
+         * Prevents access to $this/self from included files.
+         *
+         * @param  string $file
+         * @return void
+         */
+        self::$includeFile = \Closure::bind(static function($file) {
+            include $file;
+        }, null, null);
+    }
 }

+ 9 - 7
vendor/composer/InstalledVersions.php

@@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
  * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
  *
  * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
  */
 class InstalledVersions
 {
     /**
      * @var mixed[]|null
-     * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
+     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
      */
     private static $installed;
 
@@ -37,7 +39,7 @@ class InstalledVersions
 
     /**
      * @var array[]
-     * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
      */
     private static $installedByVendor = array();
 
@@ -241,7 +243,7 @@ class InstalledVersions
 
     /**
      * @return array
-     * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
+     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
      */
     public static function getRootPackage()
     {
@@ -255,7 +257,7 @@ class InstalledVersions
      *
      * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
      * @return array[]
-     * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
+     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
      */
     public static function getRawData()
     {
@@ -278,7 +280,7 @@ class InstalledVersions
      * Returns the raw data of all installed.php which are currently loaded for custom implementations
      *
      * @return array[]
-     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
      */
     public static function getAllRawData()
     {
@@ -301,7 +303,7 @@ class InstalledVersions
      * @param  array[] $data A vendor/composer/installed.php data set
      * @return void
      *
-     * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
+     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
      */
     public static function reload($data)
     {
@@ -311,7 +313,7 @@ class InstalledVersions
 
     /**
      * @return array[]
-     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
      */
     private static function getInstalled()
     {

+ 1 - 1
vendor/composer/autoload_classmap.php

@@ -2,7 +2,7 @@
 
 // autoload_classmap.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(

+ 5 - 5
vendor/composer/autoload_files.php

@@ -2,28 +2,28 @@
 
 // autoload_files.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(
     '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
-    'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
     '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
     '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
     'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
     '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
-    '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php',
-    '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
-    '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
+    'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
     '65fec9ebcfbb3cbb4fd0d519687aea01' => $vendorDir . '/danielstjules/stringy/src/Create.php',
+    '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
     'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php',
     'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
     '66453932bc1be9fb2f910a27947d11b6' => $vendorDir . '/alibabacloud/client/src/Functions.php',
     '0d0b82117c23db94c492fee02b2ed01f' => $vendorDir . '/songshenzong/support/src/StringsHelpers.php',
     'd96a90b43bcdea846705672ffd4e9294' => $vendorDir . '/songshenzong/support/src/BashEchoHelpers.php',
+    '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     '841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php',
+    '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
     '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
     'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php',
 );

+ 1 - 1
vendor/composer/autoload_namespaces.php

@@ -2,7 +2,7 @@
 
 // autoload_namespaces.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(

+ 1 - 1
vendor/composer/autoload_psr4.php

@@ -2,7 +2,7 @@
 
 // autoload_psr4.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(

+ 12 - 42
vendor/composer/autoload_real.php

@@ -25,56 +25,26 @@ class ComposerAutoloaderInit3435f7237df0603bb67e4c0c8c5cd54f
         require __DIR__ . '/platform_check.php';
 
         spl_autoload_register(array('ComposerAutoloaderInit3435f7237df0603bb67e4c0c8c5cd54f', 'loadClassLoader'), true, true);
-        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
         spl_autoload_unregister(array('ComposerAutoloaderInit3435f7237df0603bb67e4c0c8c5cd54f', 'loadClassLoader'));
 
-        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
-        if ($useStaticLoader) {
-            require __DIR__ . '/autoload_static.php';
+        require __DIR__ . '/autoload_static.php';
+        call_user_func(\Composer\Autoload\ComposerStaticInit3435f7237df0603bb67e4c0c8c5cd54f::getInitializer($loader));
 
-            call_user_func(\Composer\Autoload\ComposerStaticInit3435f7237df0603bb67e4c0c8c5cd54f::getInitializer($loader));
-        } else {
-            $map = require __DIR__ . '/autoload_namespaces.php';
-            foreach ($map as $namespace => $path) {
-                $loader->set($namespace, $path);
-            }
+        $loader->register(true);
 
-            $map = require __DIR__ . '/autoload_psr4.php';
-            foreach ($map as $namespace => $path) {
-                $loader->setPsr4($namespace, $path);
-            }
+        $filesToLoad = \Composer\Autoload\ComposerStaticInit3435f7237df0603bb67e4c0c8c5cd54f::$files;
+        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
+            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
 
-            $classMap = require __DIR__ . '/autoload_classmap.php';
-            if ($classMap) {
-                $loader->addClassMap($classMap);
+                require $file;
             }
-        }
-
-        $loader->register(true);
-
-        if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInit3435f7237df0603bb67e4c0c8c5cd54f::$files;
-        } else {
-            $includeFiles = require __DIR__ . '/autoload_files.php';
-        }
-        foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire3435f7237df0603bb67e4c0c8c5cd54f($fileIdentifier, $file);
+        }, null, null);
+        foreach ($filesToLoad as $fileIdentifier => $file) {
+            $requireFile($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
-
-/**
- * @param string $fileIdentifier
- * @param string $file
- * @return void
- */
-function composerRequire3435f7237df0603bb67e4c0c8c5cd54f($fileIdentifier, $file)
-{
-    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
-        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
-
-        require $file;
-    }
-}

+ 4 - 4
vendor/composer/autoload_static.php

@@ -8,23 +8,23 @@ class ComposerStaticInit3435f7237df0603bb67e4c0c8c5cd54f
 {
     public static $files = array (
         '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
-        'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
         '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
         '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
         'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
         '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
-        '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php',
-        '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
-        '35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
+        'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
         '65fec9ebcfbb3cbb4fd0d519687aea01' => __DIR__ . '/..' . '/danielstjules/stringy/src/Create.php',
+        '35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
         'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php',
         'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
         '66453932bc1be9fb2f910a27947d11b6' => __DIR__ . '/..' . '/alibabacloud/client/src/Functions.php',
         '0d0b82117c23db94c492fee02b2ed01f' => __DIR__ . '/..' . '/songshenzong/support/src/StringsHelpers.php',
         'd96a90b43bcdea846705672ffd4e9294' => __DIR__ . '/..' . '/songshenzong/support/src/BashEchoHelpers.php',
+        '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
+        '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
         '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
         'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php',
     );

+ 7 - 7
vendor/composer/installed.json

@@ -3440,17 +3440,17 @@
         },
         {
             "name": "wechatpay/wechatpay",
-            "version": "1.4.5",
-            "version_normalized": "1.4.5.0",
+            "version": "1.4.8",
+            "version_normalized": "1.4.8.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/wechatpay-apiv3/wechatpay-php.git",
-                "reference": "43b05b3bd471c896781ae54250fbd460567c103a"
+                "reference": "fbe8d7c2b3b367e42bf98caa0cce582b3205d427"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/wechatpay-apiv3/wechatpay-php/zipball/43b05b3bd471c896781ae54250fbd460567c103a",
-                "reference": "43b05b3bd471c896781ae54250fbd460567c103a",
+                "url": "https://api.github.com/repos/wechatpay-apiv3/wechatpay-php/zipball/fbe8d7c2b3b367e42bf98caa0cce582b3205d427",
+                "reference": "fbe8d7c2b3b367e42bf98caa0cce582b3205d427",
                 "shasum": ""
             },
             "require": {
@@ -3466,7 +3466,7 @@
                 "phpstan/phpstan": "^0.12.89 || ^1.0",
                 "phpunit/phpunit": "^7.5 || ^8.5.16 || ^9.3.5"
             },
-            "time": "2022-05-23T10:45:16+00:00",
+            "time": "2023-01-05T03:50:12+00:00",
             "bin": [
                 "bin/CertificateDownloader.php"
             ],
@@ -3504,7 +3504,7 @@
             ],
             "support": {
                 "issues": "https://github.com/wechatpay-apiv3/wechatpay-php/issues",
-                "source": "https://github.com/wechatpay-apiv3/wechatpay-php/tree/v1.4.5"
+                "source": "https://github.com/wechatpay-apiv3/wechatpay-php/tree/v1.4.8"
             },
             "install-path": "../wechatpay/wechatpay"
         },

+ 61 - 61
vendor/composer/installed.php

@@ -1,22 +1,22 @@
 <?php return array(
     'root' => array(
-        'pretty_version' => '1.0.0+no-version-set',
-        'version' => '1.0.0.0',
+        'name' => 'topthink/think',
+        'pretty_version' => 'dev-master',
+        'version' => 'dev-master',
+        'reference' => '0bde423bd1f16d88b26f67e59a7e4fc3c67a8d64',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => NULL,
-        'name' => 'topthink/think',
         'dev' => true,
     ),
     'versions' => array(
         'adbario/php-dot-notation' => array(
             'pretty_version' => '2.2.0',
             'version' => '2.2.0.0',
+            'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../adbario/php-dot-notation',
             'aliases' => array(),
-            'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e',
             'dev_requirement' => false,
         ),
         'alibabacloud/aas' => array(
@@ -178,10 +178,10 @@
         'alibabacloud/client' => array(
             'pretty_version' => '1.5.30',
             'version' => '1.5.30.0',
+            'reference' => '1f497bb79835b84094318a70b672eb88260f2682',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/client',
             'aliases' => array(),
-            'reference' => '1f497bb79835b84094318a70b672eb88260f2682',
             'dev_requirement' => false,
         ),
         'alibabacloud/cloudapi' => array(
@@ -877,10 +877,10 @@
         'alibabacloud/sdk' => array(
             'pretty_version' => '1.8.974',
             'version' => '1.8.974.0',
+            'reference' => '67e57cb530aa6cc07e34c45bb907bf959f6ac461',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/sdk',
             'aliases' => array(),
-            'reference' => '67e57cb530aa6cc07e34c45bb907bf959f6ac461',
             'dev_requirement' => false,
         ),
         'alibabacloud/skyeye' => array(
@@ -940,19 +940,19 @@
         'alibabacloud/tea' => array(
             'pretty_version' => '3.1.22',
             'version' => '3.1.22.0',
+            'reference' => 'f9c9b2c927253a1c23a5381cc655e41311be7f65',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea',
             'aliases' => array(),
-            'reference' => 'f9c9b2c927253a1c23a5381cc655e41311be7f65',
             'dev_requirement' => false,
         ),
         'alibabacloud/tea-fileform' => array(
             'pretty_version' => '0.3.4',
             'version' => '0.3.4.0',
+            'reference' => '4bf0c75a045c8115aa8cb1a394bd08d8bb833181',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea-fileform',
             'aliases' => array(),
-            'reference' => '4bf0c75a045c8115aa8cb1a394bd08d8bb833181',
             'dev_requirement' => false,
         ),
         'alibabacloud/tesladam' => array(
@@ -1066,181 +1066,181 @@
         'alipaysdk/easysdk' => array(
             'pretty_version' => '2.2.0',
             'version' => '2.2.0.0',
+            'reference' => '7a1cfa83c7e140bded957498ea072c77611e6480',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alipaysdk/easysdk',
             'aliases' => array(),
-            'reference' => '7a1cfa83c7e140bded957498ea072c77611e6480',
             'dev_requirement' => false,
         ),
         'clagiordano/weblibs-configmanager' => array(
             'pretty_version' => 'v1.1.0',
             'version' => '1.1.0.0',
+            'reference' => 'ecf584f5b3a27929175ff0abdba52f0131bef795',
             'type' => 'library',
             'install_path' => __DIR__ . '/../clagiordano/weblibs-configmanager',
             'aliases' => array(),
-            'reference' => 'ecf584f5b3a27929175ff0abdba52f0131bef795',
             'dev_requirement' => false,
         ),
         'danielstjules/stringy' => array(
             'pretty_version' => '3.1.0',
             'version' => '3.1.0.0',
+            'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../danielstjules/stringy',
             'aliases' => array(),
-            'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e',
             'dev_requirement' => false,
         ),
         'dh2y/think-qrcode' => array(
             'pretty_version' => '2.0',
             'version' => '2.0.0.0',
+            'reference' => '977d032afa27b1852f5fc5441fad2497f6db7ff5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../dh2y/think-qrcode',
             'aliases' => array(),
-            'reference' => '977d032afa27b1852f5fc5441fad2497f6db7ff5',
             'dev_requirement' => false,
         ),
         'firebase/php-jwt' => array(
             'pretty_version' => 'v5.2.1',
             'version' => '5.2.1.0',
+            'reference' => 'f42c9110abe98dd6cfe9053c49bc86acc70b2d23',
             'type' => 'library',
             'install_path' => __DIR__ . '/../firebase/php-jwt',
             'aliases' => array(),
-            'reference' => 'f42c9110abe98dd6cfe9053c49bc86acc70b2d23',
             'dev_requirement' => false,
         ),
         'guzzlehttp/guzzle' => array(
             'pretty_version' => '7.3.0',
             'version' => '7.3.0.0',
+            'reference' => '7008573787b430c1c1f650e3722d9bba59967628',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
             'aliases' => array(),
-            'reference' => '7008573787b430c1c1f650e3722d9bba59967628',
             'dev_requirement' => false,
         ),
         'guzzlehttp/promises' => array(
             'pretty_version' => '1.4.1',
             'version' => '1.4.1.0',
+            'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/promises',
             'aliases' => array(),
-            'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
             'dev_requirement' => false,
         ),
         'guzzlehttp/psr7' => array(
             'pretty_version' => '1.8.2',
             'version' => '1.8.2.0',
+            'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/psr7',
             'aliases' => array(),
-            'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
             'dev_requirement' => false,
         ),
         'guzzlehttp/uri-template' => array(
             'pretty_version' => 'v1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'b945d74a55a25a949158444f09ec0d3c120d69e2',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/uri-template',
             'aliases' => array(),
-            'reference' => 'b945d74a55a25a949158444f09ec0d3c120d69e2',
             'dev_requirement' => false,
         ),
         'league/flysystem' => array(
             'pretty_version' => '1.1.3',
             'version' => '1.1.3.0',
+            'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
             'type' => 'library',
             'install_path' => __DIR__ . '/../league/flysystem',
             'aliases' => array(),
-            'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
             'dev_requirement' => false,
         ),
         'league/flysystem-cached-adapter' => array(
             'pretty_version' => '1.1.0',
             'version' => '1.1.0.0',
+            'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
             'type' => 'library',
             'install_path' => __DIR__ . '/../league/flysystem-cached-adapter',
             'aliases' => array(),
-            'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
             'dev_requirement' => false,
         ),
         'league/mime-type-detection' => array(
             'pretty_version' => '1.7.0',
             'version' => '1.7.0.0',
+            'reference' => '3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
             'type' => 'library',
             'install_path' => __DIR__ . '/../league/mime-type-detection',
             'aliases' => array(),
-            'reference' => '3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
             'dev_requirement' => false,
         ),
         'lustre/php-dfa-sensitive' => array(
             'pretty_version' => 'v1.4',
             'version' => '1.4.0.0',
+            'reference' => 'dc33f5a4be86516582fc6ac7c25e33c21a6664e6',
             'type' => 'library',
             'install_path' => __DIR__ . '/../lustre/php-dfa-sensitive',
             'aliases' => array(),
-            'reference' => 'dc33f5a4be86516582fc6ac7c25e33c21a6664e6',
             'dev_requirement' => false,
         ),
         'mtdowling/jmespath.php' => array(
             'pretty_version' => '2.6.0',
             'version' => '2.6.0.0',
+            'reference' => '42dae2cbd13154083ca6d70099692fef8ca84bfb',
             'type' => 'library',
             'install_path' => __DIR__ . '/../mtdowling/jmespath.php',
             'aliases' => array(),
-            'reference' => '42dae2cbd13154083ca6d70099692fef8ca84bfb',
             'dev_requirement' => false,
         ),
         'nesbot/carbon' => array(
             'pretty_version' => '2.47.0',
             'version' => '2.47.0.0',
+            'reference' => '606262fd8888b75317ba9461825a24fc34001e1e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../nesbot/carbon',
             'aliases' => array(),
-            'reference' => '606262fd8888b75317ba9461825a24fc34001e1e',
             'dev_requirement' => false,
         ),
         'phpoffice/phpexcel' => array(
             'pretty_version' => '1.8.2',
             'version' => '1.8.2.0',
+            'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870',
             'type' => 'library',
             'install_path' => __DIR__ . '/../phpoffice/phpexcel',
             'aliases' => array(),
-            'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870',
             'dev_requirement' => false,
         ),
         'pimple/pimple' => array(
             'pretty_version' => 'v3.4.0',
             'version' => '3.4.0.0',
+            'reference' => '86406047271859ffc13424a048541f4531f53601',
             'type' => 'library',
             'install_path' => __DIR__ . '/../pimple/pimple',
             'aliases' => array(),
-            'reference' => '86406047271859ffc13424a048541f4531f53601',
             'dev_requirement' => false,
         ),
         'psr/cache' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/cache',
             'aliases' => array(),
-            'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
             'dev_requirement' => false,
         ),
         'psr/container' => array(
             'pretty_version' => '1.1.1',
             'version' => '1.1.1.0',
+            'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/container',
             'aliases' => array(),
-            'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
             'dev_requirement' => false,
         ),
         'psr/http-client' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/http-client',
             'aliases' => array(),
-            'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
             'dev_requirement' => false,
         ),
         'psr/http-client-implementation' => array(
@@ -1252,10 +1252,10 @@
         'psr/http-message' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/http-message',
             'aliases' => array(),
-            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
             'dev_requirement' => false,
         ),
         'psr/http-message-implementation' => array(
@@ -1267,100 +1267,100 @@
         'psr/log' => array(
             'pretty_version' => '1.1.4',
             'version' => '1.1.4.0',
+            'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/log',
             'aliases' => array(),
-            'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
             'dev_requirement' => false,
         ),
         'psr/simple-cache' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/simple-cache',
             'aliases' => array(),
-            'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
             'dev_requirement' => false,
         ),
         'qiniu/php-sdk' => array(
             'pretty_version' => 'v7.3.0',
             'version' => '7.3.0.0',
+            'reference' => '0a461e13b09545b23df361843c6a65fdd3a26426',
             'type' => 'library',
             'install_path' => __DIR__ . '/../qiniu/php-sdk',
             'aliases' => array(),
-            'reference' => '0a461e13b09545b23df361843c6a65fdd3a26426',
             'dev_requirement' => false,
         ),
         'ralouphie/getallheaders' => array(
             'pretty_version' => '3.0.3',
             'version' => '3.0.3.0',
+            'reference' => '120b605dfeb996808c31b6477290a714d356e822',
             'type' => 'library',
             'install_path' => __DIR__ . '/../ralouphie/getallheaders',
             'aliases' => array(),
-            'reference' => '120b605dfeb996808c31b6477290a714d356e822',
             'dev_requirement' => false,
         ),
         'songshenzong/support' => array(
             'pretty_version' => '2.0.5',
             'version' => '2.0.5.0',
+            'reference' => '34973c04ffcf226e503f1c3a69d30ac49f7621f6',
             'type' => 'library',
             'install_path' => __DIR__ . '/../songshenzong/support',
             'aliases' => array(),
-            'reference' => '34973c04ffcf226e503f1c3a69d30ac49f7621f6',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-mbstring' => array(
             'pretty_version' => 'v1.22.1',
             'version' => '1.22.1.0',
+            'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
             'aliases' => array(),
-            'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php72' => array(
             'pretty_version' => 'v1.22.1',
             'version' => '1.22.1.0',
+            'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php72',
             'aliases' => array(),
-            'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
             'dev_requirement' => true,
         ),
         'symfony/polyfill-php80' => array(
             'pretty_version' => 'v1.22.1',
             'version' => '1.22.1.0',
+            'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php80',
             'aliases' => array(),
-            'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
             'dev_requirement' => false,
         ),
         'symfony/process' => array(
             'pretty_version' => 'v4.4.22',
             'version' => '4.4.22.0',
+            'reference' => 'f5481b22729d465acb1cea3455fc04ce84b0148b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/process',
             'aliases' => array(),
-            'reference' => 'f5481b22729d465acb1cea3455fc04ce84b0148b',
             'dev_requirement' => false,
         ),
         'symfony/translation' => array(
             'pretty_version' => 'v5.2.7',
             'version' => '5.2.7.0',
+            'reference' => 'e37ece5242564bceea54d709eafc948377ec9749',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/translation',
             'aliases' => array(),
-            'reference' => 'e37ece5242564bceea54d709eafc948377ec9749',
             'dev_requirement' => false,
         ),
         'symfony/translation-contracts' => array(
             'pretty_version' => 'v2.4.0',
             'version' => '2.4.0.0',
+            'reference' => '95c812666f3e91db75385749fe219c5e494c7f95',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/translation-contracts',
             'aliases' => array(),
-            'reference' => '95c812666f3e91db75385749fe219c5e494c7f95',
             'dev_requirement' => false,
         ),
         'symfony/translation-implementation' => array(
@@ -1372,145 +1372,145 @@
         'symfony/var-dumper' => array(
             'pretty_version' => 'v4.4.22',
             'version' => '4.4.22.0',
+            'reference' => 'c194bcedde6295f3ec3e9eba1f5d484ea97c41a7',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/var-dumper',
             'aliases' => array(),
-            'reference' => 'c194bcedde6295f3ec3e9eba1f5d484ea97c41a7',
             'dev_requirement' => true,
         ),
         'topthink/framework' => array(
             'pretty_version' => 'v6.0.8',
             'version' => '6.0.8.0',
+            'reference' => '4789343672aef06d571d556da369c0e156609bce',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/framework',
             'aliases' => array(),
-            'reference' => '4789343672aef06d571d556da369c0e156609bce',
             'dev_requirement' => false,
         ),
         'topthink/think' => array(
-            'pretty_version' => '1.0.0+no-version-set',
-            'version' => '1.0.0.0',
+            'pretty_version' => 'dev-master',
+            'version' => 'dev-master',
+            'reference' => '0bde423bd1f16d88b26f67e59a7e4fc3c67a8d64',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => NULL,
             'dev_requirement' => false,
         ),
         'topthink/think-captcha' => array(
             'pretty_version' => 'v3.0.3',
             'version' => '3.0.3.0',
+            'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-captcha',
             'aliases' => array(),
-            'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
             'dev_requirement' => false,
         ),
         'topthink/think-helper' => array(
             'pretty_version' => 'v3.1.4',
             'version' => '3.1.4.0',
+            'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-helper',
             'aliases' => array(),
-            'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
             'dev_requirement' => false,
         ),
         'topthink/think-image' => array(
             'pretty_version' => 'v1.0.7',
             'version' => '1.0.7.0',
+            'reference' => '8586cf47f117481c6d415b20f7dedf62e79d5512',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-image',
             'aliases' => array(),
-            'reference' => '8586cf47f117481c6d415b20f7dedf62e79d5512',
             'dev_requirement' => false,
         ),
         'topthink/think-multi-app' => array(
             'pretty_version' => 'v1.0.14',
             'version' => '1.0.14.0',
+            'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-multi-app',
             'aliases' => array(),
-            'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
             'dev_requirement' => false,
         ),
         'topthink/think-orm' => array(
             'pretty_version' => 'v2.0.40',
             'version' => '2.0.40.0',
+            'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-orm',
             'aliases' => array(),
-            'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
             'dev_requirement' => false,
         ),
         'topthink/think-queue' => array(
             'pretty_version' => 'v3.0.5',
             'version' => '3.0.5.0',
+            'reference' => '7bac4d76461f0508ab306e9118f59773ffdeb49a',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-queue',
             'aliases' => array(),
-            'reference' => '7bac4d76461f0508ab306e9118f59773ffdeb49a',
             'dev_requirement' => false,
         ),
         'topthink/think-template' => array(
             'pretty_version' => 'v2.0.8',
             'version' => '2.0.8.0',
+            'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-template',
             'aliases' => array(),
-            'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
             'dev_requirement' => false,
         ),
         'topthink/think-trace' => array(
             'pretty_version' => 'v1.4',
             'version' => '1.4.0.0',
+            'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-trace',
             'aliases' => array(),
-            'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
             'dev_requirement' => true,
         ),
         'topthink/think-view' => array(
             'pretty_version' => 'v1.0.14',
             'version' => '1.0.14.0',
+            'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-view',
             'aliases' => array(),
-            'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
             'dev_requirement' => false,
         ),
         'wechatpay/wechatpay' => array(
-            'pretty_version' => '1.4.5',
-            'version' => '1.4.5.0',
+            'pretty_version' => '1.4.8',
+            'version' => '1.4.8.0',
+            'reference' => 'fbe8d7c2b3b367e42bf98caa0cce582b3205d427',
             'type' => 'library',
             'install_path' => __DIR__ . '/../wechatpay/wechatpay',
             'aliases' => array(),
-            'reference' => '43b05b3bd471c896781ae54250fbd460567c103a',
             'dev_requirement' => false,
         ),
         'wechatpay/wechatpay-guzzle-middleware' => array(
             'pretty_version' => '0.2.2',
             'version' => '0.2.2.0',
+            'reference' => '6782ac33ed8cf97628609a71cdc5e84a6a40677a',
             'type' => 'library',
             'install_path' => __DIR__ . '/../wechatpay/wechatpay-guzzle-middleware',
             'aliases' => array(),
-            'reference' => '6782ac33ed8cf97628609a71cdc5e84a6a40677a',
             'dev_requirement' => false,
         ),
         'xin/container' => array(
             'pretty_version' => '2.0.1',
             'version' => '2.0.1.0',
+            'reference' => '97bb67f87dd851545938a1f2fe0ffbd379e3ff81',
             'type' => 'library',
             'install_path' => __DIR__ . '/../xin/container',
             'aliases' => array(),
-            'reference' => '97bb67f87dd851545938a1f2fe0ffbd379e3ff81',
             'dev_requirement' => false,
         ),
         'xin/helper' => array(
             'pretty_version' => '1.0.0',
             'version' => '1.0.0.0',
+            'reference' => '02a58132dae2aea2d1c0b8e66f55125969224747',
             'type' => 'library',
             'install_path' => __DIR__ . '/../xin/helper',
             'aliases' => array(),
-            'reference' => '02a58132dae2aea2d1c0b8e66f55125969224747',
             'dev_requirement' => false,
         ),
     ),

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2022-05-27 15:10:45
+// This file is automatically generated at:2023-04-19 15:55:42
 declare (strict_types = 1);
 return array (
   0 => 'think\\captcha\\CaptchaService',

+ 15 - 0
vendor/wechatpay/wechatpay/CHANGELOG.md

@@ -1,5 +1,20 @@
 # 变更历史
 
+## [1.4.8](../../compare/v1.4.7...v1.4.8) - 2023-01-01
+
+- 新增海外账单下载`/v3/global/statements`应答特殊处理逻辑;
+
+## [1.4.7](../../compare/v1.4.6...v1.4.7) - 2022-12-06
+
+- 对PHP8.2的官方支持,如下PHP8.2的特性需要被提及:
+  - ext-openssl 有若干调整,已知在 `OpenSSL3.0` 上,常量 `RSA_SSLV23_PADDING` 被删除(详细可阅读 openssl/openssl#14216, openssl/openssl#14283),PHP做了兼容处理,如果扩展依赖的是`OpenSSL3.0`,则对应的`OPENSSL_SSLV23_PADDING`常量将不存在,进而影响到了「非对称加解密混合填充模式的测试用例」的覆盖(详情可阅读 shivammathur/setup-php#658)。本类库并不支持此填充模式,删除对`OPENSSL_SSLV23_PADDING`的测试断言,向前兼容;
+  - 对象动态属性的废弃提示([Deprecate dynamic properties](https://wiki.php.net/rfc/deprecate_dynamic_properties)),本类库实例构造的是`ArrayIterator`的一个“伪”动态属性结构体,对象属性访问实则访问的是`ArrayObject`内置`__storage`属性,形似动态属性实则不是;此废弃提示对本类库本身无影响;
+
+## [1.4.6](../../compare/v1.4.5...v1.4.6) - 2022-08-19
+
+- 取消 `APIv2` 上的`trigger_error`提醒,以消除不必要的恐慌;
+- 优化 `Transformer::walk` 方法,以支持 [Stringable](https://www.php.net/manual/zh/class.stringable.php) 对象的值转换;
+
 ## [1.4.5](../../compare/v1.4.4...v1.4.5) - 2022-05-21
 
 - 新增`APIv3`请求/响应特殊验签逻辑,国内两个下载接口自动忽略验签,海外商户账单下载仅验RSA签名,详见 [#94](https://github.com/wechatpay-apiv3/wechatpay-php/issues/94);

+ 4 - 4
vendor/wechatpay/wechatpay/README.md

@@ -15,7 +15,7 @@
 
 ### 功能介绍
 
-1. 微信支付 APIv2 和 APIv3 的 Guzzle HTTP 客户端,支持 [同步](#同步请求) 或[异步](#异步请求) 发送请求,并自动进行请求签名和应答验签
+1. 微信支付 APIv2 和 APIv3 的 Guzzle HTTP 客户端,支持 [同步](#同步请求) 或 [异步](#异步请求) 发送请求,并自动进行请求签名和应答验签
 
 1. [链式实现的 URI Template](#链式-uri-template)
 
@@ -25,7 +25,7 @@
 
 ## 项目状态
 
-当前版本为 `1.4.5` 测试版本。
+当前版本为 `1.4.8` 测试版本。
 项目版本遵循 [语义化版本号](https://semver.org/lang/zh-CN/)。
 如果你使用的版本 `<=v1.3.2`,升级前请参考 [升级指南](UPGRADING.md)。
 
@@ -36,7 +36,7 @@
 + Guzzle 7.0,PHP >= 7.2.5
 + Guzzle 6.5,PHP >= 7.1.2
 
-项目已支持 PHP 8。我们推荐使用目前处于 [Active Support](https://www.php.net/supported-versions.php) 阶段的 PHP 8.0 和 Guzzle 7。
+我们推荐使用目前处于 [Active Support](https://www.php.net/supported-versions.php) 阶段的 PHP 8 和 Guzzle 7。
 
 ## 安装
 
@@ -184,7 +184,7 @@ $promise = $instance
     echo $e->getTraceAsString(), PHP_EOL;
 });
 // 同步等待
-promise->wait();
+$promise->wait();
 
 ```
 

+ 3 - 1
vendor/wechatpay/wechatpay/README_APIv2.md

@@ -143,6 +143,8 @@ $res = $instance
 print_r($res);
 ```
 
+SDK自v1.4.6调整了XML转换函数,支持了[Stringable](https://www.php.net/manual/zh/class.stringable.php) 值的转换,对于 [Scalar](https://www.php.net/manual/zh/function.is-scalar.php) 标量值及实现了 [__toString](https://www.php.net/manual/zh/language.types.string.php#language.types.string.casting) 方法的对象,均支持直接转换,详细可参考 [TransformerTest.php](tests/TransformerTest.php) 的用例用法示例。
+
 ## 刷脸支付-人脸识别-获取调用凭证
 
 [官方开发文档地址](https://pay.weixin.qq.com/wiki/doc/wxfacepay/develop/android/faceuser.html)
@@ -182,7 +184,7 @@ print_r($res);
 ```php
 use WeChatPay\Transformer;
 $res = $instance
-->v2->sandboxnew->pay->getsignkey
+->v2->xdc->apiv2getsignkey->sign->getsignkey
 ->postAsync([
     'xml' => [
         'mch_id' => '1900000109',

+ 30 - 0
vendor/wechatpay/wechatpay/SECURITY.md

@@ -0,0 +1,30 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported          |
+| ------- | ------------------ |
+| 1.x     | :white_check_mark: |
+
+## Reporting a Vulnerability
+
+Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors.
+
+Security issues in this open source project can be safely reported to [TSRC](https://security.tencent.com).
+
+## 报告漏洞
+
+请不要使用 GitHub issues 或 pull request —— 这会让漏洞立即暴露给所有人,包括恶意人员。
+
+请将本开源项目的安全问题报告给 [腾讯安全应急响应中心](https://security.tencent.com).
+
+---
+
+另外,你可能需要关注影响本SDK运行时行为的主要的PHP扩展缺陷列表:
+
++ [OpenSSL](https://www.openssl.org/news/vulnerabilities.html)
++ [libxml2](https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/NEWS)
++ [curl](https://curl.se/docs/security.html)
+
+当你准备在报告安全问题时,请先对照如上列表,确认是否存在已知运行时环境安全问题。
+当你尝试升级主要扩展至最新版本之后,如若问题依旧存在,请将本开源项目的安全问题报告给 [TSRC腾讯安全应急响应中心](https://security.tencent.com),致谢。

+ 1 - 1
vendor/wechatpay/wechatpay/bin/README.md

@@ -35,7 +35,7 @@ Options:
 ```shell
 php -f ./bin/CertificateDownloader.php -- -k ${apiV3key} -m ${mchId} -f ${mchPrivateKeyFilePath} -s ${mchSerialNo} -o ${outputFilePath}
 ```
-// php ./bin/CertificateDownloader.php -k 5a146ebbe3f8c1942179dd5a0ef0a72 -m 162681706 -f ./bin/cert/apiclient_key.pem -s 44DBA4F4873BB928E88A0045D266FF32BB4EA7 -o ./
+
 
 ```shell

+ 0 - 28
vendor/wechatpay/wechatpay/bin/cert/apiclient_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I1u0AuKfsfjUI1A88/kIhnhF
-mu6MP14wAkpNYhUBHxvccnv8uqqO5/se9crnGvOXiZT9W4/ZnyjOBtvpH4tFW0Yt
-SxmQqUogFQKBgQC58OZT4OEm+YmxcQYdx509BIjkr4YnkFuiRX1xKR8IdJAxL0wS
-N10SJIKDgXUIEBUsb0eYK0W7nixt1rKOA2T7AYHxCrdJLpNhgqZe9eDSSbBHpkH5
-npqg56qy9514yVoFtwzvIg/PO6+MM3P9l57S1fQZgnR1oIZ47gfJ+egHFQKBgERW
-fOTUjQTj9OwjJUvFjQsaHOmMU/wqJDX3nYCVjxks8pjzaqBGu3JqT6zun2ErchHh
-KOQwPgAIfju7vZLDcoUSDSPTJ+nlMI1nVzcUf+y6ErE3nrir2b5uXgC1xPsThJqa
-V/LUbRLSIHxVNRnHHbdtY8UgXLPnq3cAl4W+7jNVAoGBAIjqZeGhSH7VYhdvGCxx
-pl6mNZhriYcGg0/hI2QVPKfelw1PLIYlkTQT87730x8GQDQ1sGAy5DvcTKJTC+1A
-rnT8gIqYaDvpT0SFtSsJu7jWvsE/OzkZom79s2leZBg62d7+jSE3xp5NK+4KvrFS
-aOObaX2Rzxe5dQ2wkoK2lznN
------END PRIVATE KEY-----

+ 1 - 1
vendor/wechatpay/wechatpay/composer.json

@@ -1,6 +1,6 @@
 {
     "name": "wechatpay/wechatpay",
-    "version": "1.4.5",
+    "version": "1.4.8",
     "description": "[A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP",
     "type": "library",
     "keywords": [

+ 2 - 2
vendor/wechatpay/wechatpay/src/Builder.php

@@ -81,8 +81,8 @@ final class Builder
 
             /**
              * Normalize the `$thing` by the rules: `PascalCase` -> `camelCase`
-             *                                    & `camelCase` -> `camel-case`
-             *                                    & `_dynamic_` -> `{dynamic}`
+             *                                    & `camelCase` -> `kebab-case`
+             *                                    & `_placeholder_` -> `{placeholder}`
              *
              * @param string $thing - The string waiting for normalization
              *

+ 1 - 1
vendor/wechatpay/wechatpay/src/ClientDecoratorInterface.php

@@ -14,7 +14,7 @@ interface ClientDecoratorInterface
     /**
      * @var string - This library version
      */
-    public const VERSION = '1.4.5';
+    public const VERSION = '1.4.8';
 
     /**
      * @var string - The HTTP transfer `xml` based protocol

+ 3 - 1
vendor/wechatpay/wechatpay/src/ClientJsonTrait.php

@@ -127,7 +127,7 @@ trait ClientJsonTrait
                 ), $request, $response);
             }
 
-            $isOverseas = 0 === strcasecmp($url, '/hk/v3/statements') && $response->hasHeader(WechatpayStatementSha1);
+            $isOverseas = (0 === strcasecmp($url, '/hk/v3/statements') || 0 === strcasecmp($url, '/v3/global/statements')) && $response->hasHeader(WechatpayStatementSha1);
 
             $verified = false;
             try {
@@ -161,6 +161,8 @@ trait ClientJsonTrait
      *
      * @see https://pay.weixin.qq.com/wiki/doc/api/wxpay/ch/fusion_wallet_ch/QuickPay/chapter8_5.shtml
      * @see https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/fusion_wallet/QuickPay/chapter8_5.shtml
+     * @see https://pay.weixin.qq.com/wiki/doc/api_external/ch/apis/chapter3_1_6.shtml
+     * @see https://pay.weixin.qq.com/wiki/doc/api_external/en/apis/chapter3_1_6.shtml
      *
      * @param ResponseInterface $response - The response instance
      *

+ 1 - 6
vendor/wechatpay/wechatpay/src/ClientXmlTrait.php

@@ -3,12 +3,9 @@
 namespace WeChatPay;
 
 use function strlen;
-use function trigger_error;
 use function sprintf;
 use function in_array;
 
-use const E_USER_DEPRECATED;
-
 use GuzzleHttp\Client;
 use GuzzleHttp\HandlerStack;
 use GuzzleHttp\Psr7\Utils;
@@ -80,8 +77,6 @@ trait ClientXmlTrait
     public static function transformRequest(?string $mchid = null, string $secret = '', ?array $merchant = null): callable
     {
         return static function (callable $handler) use ($mchid, $secret, $merchant): callable {
-            @trigger_error(Exception\WeChatPayException::DEP_XML_PROTOCOL_IS_REACHABLE_EOL, E_USER_DEPRECATED);
-
             return static function (RequestInterface $request, array $options = []) use ($handler, $mchid, $secret, $merchant): PromiseInterface {
                 $data = $options['xml'] ?? [];
 
@@ -121,7 +116,7 @@ trait ClientXmlTrait
     {
         return static function (callable $handler) use ($secret): callable {
             return static function (RequestInterface $request, array $options = []) use ($secret, $handler): PromiseInterface {
-                if (in_array($request->getRequestTarget(), static::$noneSignatureRespond)) {
+                if (in_array($request->getUri()->getPath(), static::$noneSignatureRespond)) {
                     return $handler($request, $options);
                 }
 

+ 1 - 2
vendor/wechatpay/wechatpay/src/Transformer.php

@@ -153,8 +153,7 @@ class Transformer
             if (is_array($value) || (is_object($value) && $value instanceof Traversable)) {
                 static::walk($writer, (array) $value, $item);
             } else {
-                /** @var string $value */
-                static::content($writer, $value);
+                static::content($writer, (string) $value);
             }
             $writer->endElement();
         }

+ 1 - 1
vendor/wechatpay/wechatpay/src/Util/PemUtil.php

@@ -90,6 +90,6 @@ class PemUtil
             throw new UnexpectedValueException('Read the $certificate failed, please check it whether or nor correct');
         }
 
-        return strtoupper($info['serialNumberHex'] ?? '');
+        return strtoupper($info['serialNumberHex']);
     }
 }