|
@@ -846,11 +846,15 @@ class WechatService extends BaseService
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 证书序列号
|
|
|
|
|
+ $serial = WechatService::getConfigs('wx_mch_cert_no');
|
|
|
|
|
+ $checkSerial = isset($notifyData['serial'])? $notifyData['serial'] : '';
|
|
|
|
|
+ if($serial != $checkSerial){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
$sign = stripslashes($sign);
|
|
$sign = stripslashes($sign);
|
|
|
- var_dump($signStr);
|
|
|
|
|
- var_dump($sign);
|
|
|
|
|
- var_dump($notifyData);
|
|
|
|
|
$signature = base64_decode($sign);
|
|
$signature = base64_decode($sign);
|
|
|
$publicKey = openssl_pkey_get_public(file_get_contents(self::$certPaths['cert_path']));
|
|
$publicKey = openssl_pkey_get_public(file_get_contents(self::$certPaths['cert_path']));
|
|
|
return openssl_verify($signStr, $signature, $publicKey, 'sha256WithRSAEncryption');
|
|
return openssl_verify($signStr, $signature, $publicKey, 'sha256WithRSAEncryption');
|