Pre Merge pull request !16 from Innovation/master

This commit is contained in:
Innovation 2024-10-23 07:39:16 +00:00 committed by Gitee
commit e4f0da0bc5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 15 additions and 3 deletions

View File

@ -77,4 +77,16 @@ class Scheme extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/query_urllink?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['url_link' => $urllink], true);
}
}
/**
* 创建 Short-Link
* @param array $data
* @return array
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
public function shortLink($data)
{
$url = "https://api.weixin.qq.com/wxa/genwxashortlink?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
}

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);
}
}
}