Closed hzkoala closed 7 years ago
@hzkoala 你好,请看下如下方式能行不:
打开源码文件,并找到 https://github.com/toplan/phpsms/blob/master/src/phpsms/agents/Agent.php#L170
改成
public function curlPost($url, array $params = [], array $opts = [])
{
$options = [
CURLOPT_POST => true,
CURLOPT_URL => $url,
];
foreach ($opts as $key => $value) {
if ($key !== CURLOPT_POST && $key !== CURLOPT_URL) {
$options[$key] = $value;
}
}
if (!array_key_exists(CURLOPT_POSTFIELDS, $options)) {
$options[CURLOPT_POSTFIELDS] = $this->params($params);
}
return self::curl($options);
}
@toplan 试了, 没有变化 按客服的意思, 应该是接口和参数不匹配, 跟请求的方法没啥关系 有空你本地测试一下, 应该也发不出去才正常 aliyun的新版本刚上, 可能用的还不多, 反馈少
@hzkoala 我怀疑是时区导致的问题
把 https://github.com/toplan/phpsms/blob/master/src/phpsms/agents/AliyunAgent.php#L44 这里的date
函数换成gmdate
看看
"{"RequestId":"FF733085-B27A-494E-B151-C0AC008708D6","HostId":"sms.aliyuncs.com","Code":"Forbidden","Message":"User not authorized to operate on the specified resource."}"
我看下是不是参数配置有问题
我本地试了下,报的这个错误:"{"RequestId":"F74BA463-AA6A-497C-9335-9EFFFD2DEC9E","HostId":"sms.aliyuncs.com","Code":"InvalidDayuStatus.Malformed","Message":"The specified dayu status is wrongly formed."}"
@toplan 我们分头修复一下吧, 搞定了at一下 :D
@hzkoala @toplan 提交了修复阿里云短信的pr
已经发布 1.8.3
阿里云短信发送, 一直提示"InvalidTimeStamp.Expired"
检查时间戳字段, 没有问题
咨询技术客服, 回复如下
客服说是接口调用url错误