定制 christian-giupponi/nexmo 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

christian-giupponi/nexmo

最新稳定版本:1.0

Composer 安装命令:

composer require christian-giupponi/nexmo

包简介

This is a Laravel4 package that helps you integrate Nexmo sms services into your site.

README 文档

README

This is a Laravel4 package that helps you integrate Nexmo sms services into your site.
This is a work in progress so right now these are the function available:

  1. Get Account Balance
  2. Get Prices and Carriers
  3. Send SMS

Laravel 4.2 and below

You can install this package through Composer. Edit your composer.json file and add christian-giupponi/nexmo to the required:

"require" : {
    "christian-giupponi/nexmo": "dev-master"
}

ext, update Composer from the Terminal:

composer update

Now you have to add the Service Provider so edit your app/config/app.php file and in the providers array add:

'ChristianGiupponi\Nexmo\NexmoServiceProvider'

Now add the Facade in aliases array:

    'Nexmo'    => 'ChristianGiupponi\Nexmo\Facades\Nexmo',

You also need to pusblish the config file to add your own api and secret key that you can find on your Nexmo's dashboard:

php artisan config:publish christian-giupponi/nexmo

And you're done. Now you can call nexmo package using

Nexmo::getBalance();
Nexmo::prices();
Nexmo::sendSMS($from, $to, $text, $options);

Results

All the function of this package will return a json result. It is made with 3 fiedls:

1. code
2. reason
3. body

1. Code

This fields will return an http code status that is generated by the http request and represent the result of the api call, is not the code returned from Nexmo.
It is generated by the Guzzle client and you can check if the request is correct.

2. Reason

Like the above it is generated by Gruzzle and contains the result of the api request, not the response from Nexmo.
In this fild you can check if there are any errors, like malformed request.

3. Body

This is a Json result sent by Nexmo after we call its api

Issue

If you find any issue please post it here on GitHub, fell free to fork and add any new api call that you need and then please make a pull request to keep this project updated.

统计信息

  • 总下载量: 2.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-11-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固