Skip to content
New issue

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

对接的云片,有报错,但是catch 返回是空的 #226

Open
chesterlyd opened this issue Oct 9, 2019 · 1 comment
Open

对接的云片,有报错,但是catch 返回是空的 #226

chesterlyd opened this issue Oct 9, 2019 · 1 comment

Comments

@chesterlyd
Copy link

code

$easySms = new EasySms($config);

$easySms->send($params['phone'], [
     'content' => function ($gateway) {
        return '您的验证码为: 6379';
    },
]);

config

<?php
return [

    'resend' => 60, // 重新发送的时间,单位:秒 从后台获取

    'code_failure_time' => 5, // 验证码失效时间,单位:分钟 从后台获取

    // HTTP 请求的超时时间(秒)
    'timeout' => 5.0,

    // 默认发送配置
    'default' => [
        // 网关调用策略,默认:顺序调用
        'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,

        // 默认可用的发送网关
        'gateways' => [
            'yunpian',
        ],
    ],
    // 可用的网关配置
    'gateways' => [
        'errorlog' => [
            'file' => '/tmp/easy-sms.log',
        ],
        'yunpian' => [
            'api_key' => 'c72**************',
        ],
    ],
];

返回值

{
    "code": 0,
    "status": "fail",
    "msg": {
        "yunpian": {}
    }
}
@successgo
Copy link
Contributor

@chesterlyd hi 时间已过去挺长得,请问这个问题还会出现吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants