nandwabee/africastalking 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nandwabee/africastalking

Composer 安装命令:

composer require nandwabee/africastalking

包简介

A composer package for the Africa's talking mobile API's

README 文档

README

This is another look at the AfricasTalking API for PHP.

I wrote it to meet a personal project need and it should suffice for many other use cases.

Requirements

The main difference between this code and the official wrapper is that I opted to go for guzzle instead of hard dependency on Curl.

  • Guzzle
  • PHP 5.5.0 or newer. PHP 7 is currently not tested.

Be sure to checkout Guzzle's own dependencies.

Documentation

Install using composer.

composer require nandwabee/africastalking

Sending Messages

An sms can be sent out by calling the send() method.

The send method returns an array when a message is sent successfully.

Example code below ;

//Instantiate the object.

$obj = new AfricasTalking('my_username','my_key');

$response = $obj->send($to,$message,$options);

//Do something with the array

Parameters

$to : array This is an array of the numbers to send the messages to.

$message : string The message to be sent.

$options : array An array of optional parameters.

The options parameter allows the following parameters;

from,bulkSMSMode,enqueue,keyword,linkId,retryDurationInHours

The expected values for either of those parameters can be found on the AfricasTalking API Docs

Todo

Exception handling

Fetching User Details

Contribution

This is an open source project so all ideas to help make this a better tool for other developers are highly welcome.

Try as much as possible to stick to the PSR-4 standards.

Waiting for the pull requests :-)

##TODO

  • Send SMS
  • Support phone calls
  • Receive SMS messages
  • Support to Premium rate SMS services
  • Create a sample Laravel 5 package
  • Update the documentation with sample code
  • Support for USSD
  • Write tests
  • Support for airtime transactions
  • Fetch User data
  • Improve exception handling.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固