Skip to content

Commit

Permalink
腾讯云模板和签名功能 (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
crny authored and overtrue committed Jul 13, 2018
1 parent ee586f0 commit 68d3e8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Gateways/QcloudGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ public function send(PhoneNumberInterface $to, MessageInterface $message, Config
'extend' => '',
'ext' => '',
];

if (!is_null($message->getTemplate($this)) && is_array($message->getData($this))) {
unset($params['msg']);
$params['params'] = array_values($message->getData($this));
$params['tpl_id'] = $message->getTemplate($this);
$params['sign'] = $config->get('sign_name');
}
$random = substr(uniqid(), -10);

$params['sig'] = $this->generateSign($params, $random);
Expand Down

0 comments on commit 68d3e8a

Please sign in to comment.