AI微信支付遇到appid不存在,咋办呢

wocall

#### 问题描述

这里详细描述问题

配置里面填写的是小程序的appid,微信账户管理里也已经关联,证书也已经部署,不知为啥总是这个提示。。。。

请教大佬,帮个忙,找找可能的原因!

1371 3 0
3个回答

walkor 打赏

app_id不填写,只填写mini_app_id试下

  • wocall 2023-10-01

    因为这个错误,才填的:((

wocall

刚才发现,服务器一直在报错:

security check fail {"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, could get access_token by getStableAccessToken, more details at https:\/\/mmbizurl.cn\/s\/JtxxFh33r rid: 651e92c6-329d2f4c-716224a6"} and try restart security process

查了一下,貌似是AppID 的问题,这可就郁闷了。不知从何查起。。。
老大,有可提示的地方么?

  • walkor 2023-10-05

    我对微信支付也不熟悉,如果有公众号试下关联公众号,设置公众号id

  • wocall 2023-10-05

    唉,好几万粉丝的公众号被永禁了

wocall

按照yansongda 回复的方法修改了

        $order = [
            '_type' => 'mini',
            'out_trade_no' => $orderId,
            'description' => $subject,
            'amount' => [
                'total' => (float)$totalAmount * 100,
            ],
        ];
        //$result = Pay::wechat()->scan($order);
        $result = Pay::wechat()->mini($order);

然后报错一大堆:

Yansongda\Pay\Exception\InvalidResponseException in /webman/vendor/yansongda/pay/src/Functions.php:204
Stack trace:
#0 /webman/vendor/yansongda/pay/src/Plugin/Wechat/LaunchPlugin.php(32): verify_wechat_sign()
#1 /webman/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\LaunchPlugin->assembly()
#2 /webman/vendor/yansongda/pay/src/Plugin/Wechat/SignPlugin.php(49): Yansongda\Supports\Pipeline->Yansongda\Supports\{closure}()
#3 /webman/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\SignPlugin->assembly()
#4 /webman/vendor/yansongda/pay/src/Plugin/Wechat/Pay/Common/InvokePrepayPlugin.php(29): Yansongda\Supports\Pipeline->Yansongda\Supports\{closure}()
#5 /webman/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\Pay\Common\InvokePrepayPlugin->assembly()
#6 /webman/vendor/yansongda/pay/src/Plugin/Wechat/GeneralPlugin.php(30): Yansongda\Supports\Pipeline->Yansongda\Supports\{closure}()
#7 /webman/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\GeneralPlugin->assembly()
#8 /webman/vendor/yansongda/pay/src/Plugin/Wechat/PreparePlugin.php(23): Yansongda\Supports\Pipeline->Yansongda\Supports\{closure}()
#9 /webman/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\PreparePlugin->assembly()
#10 /webman/vendor/yansongda/supports/src/Pipeline.php(84): Yansongda\Supports\Pipeline->Yansongda\Supports\{closure}()
#11 /webman/vendor/yansongda/pay/src/Provider/AbstractProvider.php(70): Yansongda\Supports\Pipeline->then()
#12 /webman/vendor/yansongda/pay/src/Provider/AbstractProvider.php(44): Yansongda\Pay\Provider\AbstractProvider->pay()
#13 /webman/vendor/yansongda/pay/src/Provider/Wechat.php(54): Yansongda\Pay\Provider\AbstractProvider->call()
#14 /webman/plugin/ai/app/controller/OrderController.php(211): Yansongda\Pay\Provider\Wechat->__call()
#15 /webman/vendor/workerman/webman-framework/src/App.php(319): plugin\ai\app\controller\OrderController->wechatQr()
#16 /webman/vendor/workerman/webman-framework/src/App.php(349): Webman\App::Webman\{closure}()
#17 /webman/plugin/ai/app/middleware/AccessControl.php(59): Webman\App::Webman\{closure}()
#18 /webman/vendor/workerman/webman-framework/src/App.php(341): plugin\ai\app\middleware\AccessControl->process()
#19 /webman/vendor/workerman/webman-framework/src/App.php(168): Webman\App::Webman\{closure}()
#20 /webman/vendor/workerman/workerman/Connection/TcpConnection.php(646): Webman\App->onMessage()
#21 /webman/vendor/workerman/workerman/Events/Select.php(311): Workerman\Connection\TcpConnection->baseRead()
#22 /webman/vendor/workerman/workerman/Worker.php(1635): Workerman\Events\Select->loop()
#23 /webman/vendor/workerman/workerman/Worker.php(1426): Workerman\Worker::forkOneWorkerForLinux()
#24 /webman/vendor/workerman/workerman/Worker.php(1400): Workerman\Worker::forkWorkersForLinux()
#25 /webman/vendor/workerman/workerman/Worker.php(1785): Workerman\Worker::forkWorkers()
#26 /webman/vendor/workerman/workerman/Worker.php(1721): Workerman\Worker::monitorWorkersForLinux()
#27 /webman/vendor/workerman/workerman/Worker.php(562): Workerman\Worker::monitorWorkers()
#28 /webman/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\Worker::runAll()
#29 /webman/start.php(4): support\App::run()
#30 {main}

老大,该咋改呀

  • walkor 2023-11-06

    InvalidResponseException 应该是微信返回的数据 yansongda/pay 无法识别,你需要打印下微信返回的什么,然后再定位

  • 岛屿可以找到海 2023-12-08

    楼主最后怎么解决的

  • wocall 2023-12-09

    还没解决

年代过于久远,无法发表回答
×
🔝