承接 enigma972/orange-api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

enigma972/orange-api-client

Composer 安装命令:

composer require enigma972/orange-api-client

包简介

PHP SDK for Orange APIs Client with Token Caching

README 文档

README

Orange APIs Client with Token Caching

Installation

You need to have composer installed in your computer before doing this

composer require enigma972/orange-api-client

Quick setup and Basic example (SMS)

Get client_id and client_secret here

All examples here

<?php
require_once './../../vendor/autoload.php';

use OrangeApiClient\Service\Sms\Sms;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use OrangeApiClient\Client;
use OrangeApiClient\Service\Sms\Message;

$cache = new FilesystemAdapter();
$client = new Client($cache, 'YOUR-CLIENT-ID', 'YOUR-CLIENT-SECRET');

$sms = new Sms($client);

$message = new Message();
$message
    ->content('Hello world, via Orange SMS API.')
    ->from(243899999999)
    ->as('Enigma972')
    ->to(243899999999)
    ;

$response = $sms->doSend($message);

dd($response->toArray());

If all is ok, $response should be like this :

^ array:1 [▼
  "outboundSMSMessageRequest" => array:4 [▼
    "address" => array:1 [▼
      0 => "tel:+243899999999"
    ]
    "senderAddress" => "tel:+243899999999"
    "outboundSMSTextMessage" => array:1 [▼
      "message" => "Hello world, via Orange SMS API."
    ]
    "resourceURL" => "https://api.orange.com/smsmessaging/v1/outbound/tel:+243899999999/requests/2fdd2d6e-c155-43d3-97ef-1dce0dc648d5"
  ]
]

Also read ismaeltoe/osms and informagenie/orange-sms.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固