overtrue / easy-sms

📲 一款满足你的多种发送需求的短信发送组件
MIT License
3.13k stars 543 forks source link

华为云 签名 #241

Closed mscchen closed 3 years ago

mscchen commented 4 years ago

华为云使用国内短信通用模板时,必须填写签名名称 需要但是我看HuaweiGateway -> send方法$params参数里没有signature,请问一下怎么配置呢,如果没有设置的话能够加上

xueyucanyang commented 4 years ago
 $config = [
            // HTTP 请求的超时时间(秒)
            'timeout' => 5.0,
            // 默认发送配置
            'default' => [
                'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,
                // 默认可用的发送网关
                'gateways' => [
                    'huawei',
                ],
            ],
            // 可用的网关配置
            'gateways' => [
                'errorlog' => [
                    'file' => storage_path().'/sms/easy-sms.log',
                ],
                'yunpian' => [
                    'api_key' => '824f0ff2f71cab52936axxxxxxxxxx',
                ],
                'aliyun' => [
                    'access_key_id' => '',
                    'access_key_secret' => '',
                    'sign_name' => '',
                ],
                'huawei' => [
                    'endpoint' => $endpoint, // APP接入地址
                    'app_key' => $app_key, // APP KEY
                    'app_secret' => $app_secret, // APP SECRET
                    'from' => [
                        'default' => $sign_channel, // 默认使用签名通道号
                    ],
                    'callback' => '' // 短信状态回调地址
                ],
            ],
        ];