定制 unicodeveloper/jusibe-php-lib 二次开发

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

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

unicodeveloper/jusibe-php-lib

最新稳定版本:1.0.4

Composer 安装命令:

composer require unicodeveloper/jusibe-php-lib

包简介

Jusibe PHP Library

README 文档

README

Latest Stable Version License Build Status Coveralls Quality Score Total Downloads

Jusibe Library for PHP

Installation

PHP 7.0+ or HHVM 3.3+, and Composer are required.

To get the latest version of jusibe-php-lib, simply add the following line to the require block of your composer.json file.

"unicodeveloper/jusibe-php-lib": "1.0.*"

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Usage

Available methods for use are:

/**
 * Send SMS using the Jusibe API
 * @param  array $payload
 * @return object
 */
$jusibe->sendSMS($payload)->getResponse();

/**
 * Send Bulk SMS using the Jusibe API
 * @param  array $payload
 * @return object
 */
$jusibe->sendBulkSMS($payload)->getResponse();

/**
 * Check the available SMS credits left in your Jusibe account
 * @return object
 */
$jusibe->checkAvailableCredits()->getResponse();

/**
 * Check the delivery status of a sent SMS
 * @param  string $messageID
 * @return object
 */
$jusibe->checkDeliveryStatus('8nb1wrgdjw')->getResponse();

/**
 * Check the delivery status of a sent Bulk SMS
 * @param  string $bulkID
 * @return object
 */
$jusibe->checkBulkDeliveryStatus('8nb1wrgdjw')->getResponse();

Send an SMS

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

$message = "I LOVE YOU, BABY";

$payload = [
    'to' => '7079740987',
    'from' => 'PROSPER DATING NETWORK',
    'message' => $message
];

try {
    $response = $jusibe->sendSMS($payload)->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

SendSMS Response

Send a Bulk SMS

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

$message = "You are invited for party!!!";

$payload = [
    'to' => '7079740987,8077139164',
    'from' => 'DOZIE GROUP',
    'message' => $message
];

try {
    $response = $jusibe->sendBulkSMS($payload)->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Send BulkSMS Response

Check SMS Credits

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

try {
   $response = $jusibe->checkAvailableCredits()->getResponse();
   print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Check SMS Credits Response

Check Delivery Status

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

try {
    $response = $jusibe->checkDeliveryStatus('8nb1wrgdjw')->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Check Delivery Status Response

Check Bulk Delivery Status

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

try {
    $response = $jusibe->checkBulkDeliveryStatus('n2v9gby1jy')->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Check Bulk Delivery Status Response

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

How can I thank you?

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!

Don't forget to follow me on twitter!

Thanks! Prosper Otemuyiwa.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 17.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 34
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 34
  • Watchers: 3
  • Forks: 7
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固