Commit 3633884b authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 927a9718
...@@ -205,14 +205,14 @@ class BaiwangApiService extends PlatformAbstractService ...@@ -205,14 +205,14 @@ class BaiwangApiService extends PlatformAbstractService
"host: ".$host."\n". "host: ".$host."\n".
"x-htjs-nonce: ".$nonce."\n". "x-htjs-nonce: ".$nonce."\n".
"x-htjs-ua: ".$ua; "x-htjs-ua: ".$ua;
$signature = base64_encode(hash_hmac('sha256', $sign_str, $sercret, true)); $signature = $this->base64UrlEncode(hash_hmac('sha256', $sign_str, $sercret, true));
return [ return [
'date' => $date, 'date' => $date,
'host' => $host, 'host' => $host,
'x-htjs-nonce' => $nonce, 'x-htjs-nonce' => $nonce,
'x-htjs-ua' => $ua, 'x-htjs-ua' => $ua,
'Authorization' => 'hmac username="'.$key.'", algorithm="hmac-sha256", headers="request-line date host x-htjs-nonce x-htjs-ua", signature="'.$this->base64UrlEncode($signature).'"' 'Authorization' => 'hmac username="'.$key.'", algorithm="hmac-sha256", headers="request-line date host x-htjs-nonce x-htjs-ua", signature="'.$signature.'"'
]; ];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment