mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-06 03:58:03 +08:00
Update BasicWePay.php
This commit is contained in:
parent
d657658c93
commit
25b47108ac
@ -107,9 +107,7 @@ abstract class BasicWePay
|
|||||||
public function doRequest($method, $pathinfo, $jsondata = '', $verify = false)
|
public function doRequest($method, $pathinfo, $jsondata = '', $verify = false)
|
||||||
{
|
{
|
||||||
list($time, $nonce) = [time(), uniqid() . rand(1000, 9999)];
|
list($time, $nonce) = [time(), uniqid() . rand(1000, 9999)];
|
||||||
$signstr = join("\n", [
|
$signstr = join("\n", [$method, $pathinfo, $time, $nonce, $jsondata, '']);
|
||||||
$method, $pathinfo, $time, $nonce, $jsondata, '',
|
|
||||||
]);
|
|
||||||
// 生成数据签名TOKEN
|
// 生成数据签名TOKEN
|
||||||
$token = sprintf('mchid="%s",nonce_str="%s",timestamp="%d",serial_no="%s",signature="%s"',
|
$token = sprintf('mchid="%s",nonce_str="%s",timestamp="%d",serial_no="%s",signature="%s"',
|
||||||
$this->config['mch_id'], $nonce, $time, $this->config['cert_serial'], $this->signBuild($signstr)
|
$this->config['mch_id'], $nonce, $time, $this->config['cert_serial'], $this->signBuild($signstr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user