|
|
@@ -249,9 +249,10 @@ class WxpayV2{
|
|
|
$apiv2Key = $this->config["ApiV2Key"];// 在商户平台上设置的APIv2密钥
|
|
|
$inBodyArray = Transformer::toArray($inBody);
|
|
|
var_dump($inBodyArray);
|
|
|
- ['sign_type' => $signType, 'sign' => $sign] = $inBodyArray;
|
|
|
+ $signType = empty($inBodyArray["sign_type"]) ? Hash::ALGO_MD5 : $inBodyArray["sign_type"];
|
|
|
+ $sign = $inBodyArray["sign"];
|
|
|
$calculated = Hash::sign(
|
|
|
- $signType ?? Hash::ALGO_MD5,// 如没获取到`sign_type`,假定默认为`MD5`
|
|
|
+ $signType,// 如没获取到`sign_type`,假定默认为`MD5`
|
|
|
Formatter::queryStringLike(Formatter::ksort($inBodyArray)),
|
|
|
$apiv2Key
|
|
|
);
|