mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-06 03:58:03 +08:00
[更新]修改支付通知签名处理
This commit is contained in:
parent
8cd19c0e19
commit
7438d3b708
@ -95,9 +95,8 @@ class BasicPay
|
|||||||
public function getPaySign(array $data, $signType = 'MD5', $buff = '')
|
public function getPaySign(array $data, $signType = 'MD5', $buff = '')
|
||||||
{
|
{
|
||||||
ksort($data);
|
ksort($data);
|
||||||
foreach ($data as $k => $v) {
|
if (isset($data['sign'])) unset($data['sign']);
|
||||||
$buff .= "{$k}={$v}&";
|
foreach ($data as $k => $v) $buff .= "{$k}={$v}&";
|
||||||
}
|
|
||||||
$buff .= ("key=" . $this->config->get('mch_key'));
|
$buff .= ("key=" . $this->config->get('mch_key'));
|
||||||
if (strtoupper($signType) === 'MD5') {
|
if (strtoupper($signType) === 'MD5') {
|
||||||
return strtoupper(md5($buff));
|
return strtoupper(md5($buff));
|
||||||
@ -109,7 +108,7 @@ class BasicPay
|
|||||||
* 转换短链接
|
* 转换短链接
|
||||||
* @param string $longUrl 需要转换的URL,签名用原串,传输需URLencode
|
* @param string $longUrl 需要转换的URL,签名用原串,传输需URLencode
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \WeChat\Exceptions\ExcInvalidResponseException
|
* @throws InvalidResponseException
|
||||||
* @throws \WeChat\Exceptions\LocalCacheException
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
*/
|
*/
|
||||||
public function shortUrl($longUrl)
|
public function shortUrl($longUrl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user