fix(V3支付): App 支付回包 appid 改用 appAppId
configForAppPayment() 之前返回公众号 appid(wechatAppid), 而下单用的是开放平台移动应用 appid(appAppId)→ App 调起微信支付 会因 appid/签名不匹配失败。V3 已确认启用,此修复为 App 支付前置。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user