修改问诊退款回调,只有退款成功,才会推送消息

This commit is contained in:
2023-04-13 10:54:14 +08:00
parent e613684842
commit 45fc94bcee
3 changed files with 41 additions and 26 deletions
+14 -6
View File
@@ -40,12 +40,12 @@ class Kuaidi
* @return mixed
* @throws GuzzleException
*/
protected function httpRequest(string $path, array $arg = []): mixed
protected function httpRequest(string $path, string $arg = []): mixed
{
$option = [
"headers" => [
"sign" => config("ca.app_id"),
"signature" => $this->getRequestSign($arg),
"json" => [
"schema" => "json",
"param" => json_encode($params, JSON_UNESCAPED_UNICODE),
],
];
@@ -75,8 +75,16 @@ class Kuaidi
return $body['body'];
}
protected function getSign(string $data){
$sign = md5($data . config("kuaidi100.key") . config("kuaidi100.customer"));
/**
* 获取签名
* @param string $params
* @return string
*/
protected function getSign(string $params): string
{
return md5($params . config("kuaidi100.key") . config("kuaidi100.customer"));
}
public function
}