Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Apr 26, 2019
1 parent 44423a3 commit 68dee5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Gateways/ChuanglanGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,20 @@ public function send(PhoneNumberInterface $to, MessageInterface $message, Config
*/
protected function buildEndpoint(Config $config, $idDCode = 86)
{
$channel = $this->getChannel($config);
$channel = $this->getChannel($config, $idDCode);

return sprintf(self::ENDPOINT_URL_TEMPLATE, $channel);
}

/**
* @param Config $config
* @param int $idDCode
*
* @return mixed
*
* @throws InvalidArgumentException
*/
protected function getChannel(Config $config)
protected function getChannel(Config $config, $idDCode)
{
if (86 != $idDCode) {
return self::INT_URL;
Expand Down

0 comments on commit 68dee5c

Please sign in to comment.