创建JsApi及H5支付参数时兼容子商户模式

This commit is contained in:
Innovation 2023-10-13 11:33:01 +08:00
parent 2708e8d94a
commit 7159f4c72e

View File

@ -87,7 +87,7 @@ class Order extends BasicWePay
public function jsapiParams($prepayId)
{
$option = [];
$option["appId"] = $this->config->get('appid');
$option["appId"] = $this->config->get('sub_appid') ? $this->config->get('sub_appid') : $this->config->get('appid');
$option["timeStamp"] = (string)time();
$option["nonceStr"] = Tools::createNoncestr();
$option["package"] = "prepay_id={$prepayId}";
@ -172,4 +172,4 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/payitil/report';
return $this->callPostApi($url, $options);
}
}
}