We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
近日使用网易云信通知短信,报错,经检查无云信通知模板短信格式 做一下修改 `switch ($action) { case 'sendCode': $params = $this->buildSendCodeParams($to, $message, $config);
break; case 'sendTemplate': $params = $this->buildSendMsgParams($to, $message, $config); break; case 'verifyCode': $params = $this->buildVerifyCodeParams($to, $message); break; default:`
新增sendTemplate 以及参数格式函数buildSendMsgParams `public function buildSendMsgParams(PhoneNumberInterface $to, MessageInterface $message, Config $config) {
$data = $message->getData($this); $template = $message->getTemplate($this); if (!array_key_exists('params', $data)) { throw new GatewayErrorException('"params" cannot be empty', 0); } return [ 'mobiles' => json_encode([$to->getUniversalNumber()]), 'templateid' => is_string($template) ? $template : '', 'params'=>array_key_exists('params', $data) ? $data['params'] : '', 'needUp' => $config->get('need_up', false), ]; }`
使用方法 $massage=[ 'template' => 'xxxx', 'data' => [ 'params' =>json_encode([$params]), 'action' => 'sendTemplate', ], ];
$massage=[ 'template' => 'xxxx', 'data' => [ 'params' =>json_encode([$params]), 'action' => 'sendTemplate', ], ];
The text was updated successfully, but these errors were encountered:
欢迎 PR
Sorry, something went wrong.
No branches or pull requests
近日使用网易云信通知短信,报错,经检查无云信通知模板短信格式
做一下修改
`switch ($action) {
case 'sendCode':
$params = $this->buildSendCodeParams($to, $message, $config);
新增sendTemplate 以及参数格式函数buildSendMsgParams
`public function buildSendMsgParams(PhoneNumberInterface $to, MessageInterface $message, Config $config)
{
使用方法
$massage=[ 'template' => 'xxxx', 'data' => [ 'params' =>json_encode([$params]), 'action' => 'sendTemplate', ], ];
The text was updated successfully, but these errors were encountered: