From 9a1c9226423cd9486195f805a57353b62c5d8cef Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Mon, 26 Oct 2026 19:28:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(V3=E6=94=AF=E4=BB=98):=20App=20=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=9B=9E=E5=8C=85=20appid=20=E6=94=B9=E7=94=A8=20appA?= =?UTF-8?q?ppId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit configForAppPayment() 之前返回公众号 appid(wechatAppid), 而下单用的是开放平台移动应用 appid(appAppId)→ App 调起微信支付 会因 appid/签名不匹配失败。V3 已确认启用,此修复为 App 支付前置。 Co-authored-by: Cursor --- crmeb/services/wechat/v3pay/PayClient.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crmeb/services/wechat/v3pay/PayClient.php b/crmeb/services/wechat/v3pay/PayClient.php index 07b40d0..0361cef 100644 --- a/crmeb/services/wechat/v3pay/PayClient.php +++ b/crmeb/services/wechat/v3pay/PayClient.php @@ -453,8 +453,11 @@ class PayClient extends BaseClient */ public function configForAppPayment(string $prepayId): array { + /* ⚠️ App 支付必须用「开放平台移动应用」的 appid(appAppid), + 不能用公众号 appid(wechatAppid)—— 下单用的是 appAppid(见 appPay()), + 两边不一致会导致客户端调起微信支付时报 appid/签名不匹配(2026-10-26 修复)。 */ $params = [ - 'appid' => $this->config->wechatAppid, + 'appid' => $this->config->appAppid, 'partnerid' => $this->config->mchId, 'prepayid' => $prepayId, 'noncestr' => uniqid(),