diff --git a/WePay/Order.php b/WePay/Order.php index 91cb195..5040acb 100644 --- a/WePay/Order.php +++ b/WePay/Order.php @@ -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); } -} \ No newline at end of file +}