missmycat / aliyun-sms Goto Github PK
View Code? Open in Web Editor NEW适应Laravel框架和非laravel框架,基于2017-05阿里云更新的短信接口封装。
适应Laravel框架和非laravel框架,基于2017-05阿里云更新的短信接口封装。
我是laravel5.4...每次刷新都报错如下:
{#1677 ▼
+"Message": "未开通云通信产品的阿里云客户"
+"RequestId": "9A1FF519-FD2E-45BE-9236-35FB55B0E3DC"
+"Code": "isv.PRODUCT_UN_SUBSCRIPT"
}
配置都是对的,,,工单也问了,服务确实开了,请问是不支持laravel5.4吗?
提示 “未开通云通信产品的阿里云客户”? 我开通了帐户了呀
Constant ROOT_PATH already defined
,
错误行https://github.com/MissMyCat/aliyun-sms-sdk/blob/master/aliyun-php-sdk-core/Profile/DefaultProfile.php#L47
同时ROOT_PATH
可能会和一些框架冲突,建议修改一下
TypeError: Argument 2 passed to GuzzleHttp\Exception\BadResponseException::__construct() must be an instance of Psr\Http\Message\RequestInterface, string given, called in vendor\mrgoon\aliyun-sms-sdk\aliyun-php-sdk-core\DefaultAcsClient.php on line 122
遇到了composer install的时候把.git目录都拉下来了
希望楼主处理一下
http://blog.csdn.net/allen_tsang/article/details/75212310
感谢!
Mrgoon\AliyunSmsSdk\Http\HttpHelper
未引用 Mrgoon\AliyunSmsSdk\Exception\ClientException
64行throw new ClientException("Server unreachable: Errno: " . curl_errno($ch) . " " . curl_error($ch), "SDK.ServerUnreachable");会出现not found错误
可以给**手机号发短信吗?
在使用过程中提示找不到
GuzzleHttp\Exception\ServerException
查看composer,没有安装 guzzlehttp/guzzle,
安装:
composer require guzzlehttp/guzzle
之后出现错误:
Argument 2 passed to GuzzleHttp\Exception\BadResponseException::__construct() must be an instance of Psr\Http\Message\RequestInterface, string given, called in /home/chen/laravel/huayujy/vendor/mrgoon/aliyun-sms-sdk/aliyun-php-sdk-core/DefaultAcsClient.php on line 122
暂时我将其修改为 throw new \Exception()之后解决,出现错误讯息:
Specified access key is not found.
Argument 2 passed to GuzzleHttp\Exception\BadResponseException::__construct() must implement interface Psr\Http\Message\RequestInterface, string given, called in /.../.../vendor/mrgoon/aliyun-sms-sdk/aliyun-php-sdk-core/DefaultAcsClient.php on line 122
(Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Argument 2 passed to GuzzleHttp\Exception\BadResponseException::__construct() must implement interface Psr\Http\Message\RequestInterface, string given, called in /.../.../vendor/mrgoon/aliyun-sms-sdk/aliyun-php-sdk-core/DefaultAcsClient.php on line 122 at
看了下源码,有个参数传的貌似有问题?
我的laravel5.4好像没有这个包,引入"guzzlehttp/guzzle": "~6.0"提示构造函数参数类型不对
引用
throw new ServerException($respObject->Message, $respObject->Code, $httpStatus, $respObject->RequestId);
类中构造函数
public function __construct(
$message,
RequestInterface $request,
ResponseInterface $response = null,
\Exception $previous = null,
array $handlerContext = []
)
{#1461 ▼
+"Message": "未开通云通信产品的阿里云客户"
+"RequestId": "982DDFD1-621D-495A-81B9-77DE64C42E42"
+"Code": "isv.PRODUCT_UN_SUBSCRIPT"
}
明明在阿里控制台已经开通了啊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.