承接 jadessoriano/mobivate-sdk-php 相关项目开发

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

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

jadessoriano/mobivate-sdk-php

最新稳定版本:1.1.1

Composer 安装命令:

composer require jadessoriano/mobivate-sdk-php

包简介

Mobivate SDK for PHP

README 文档

README

Mobivate SDK PHP

Mobivate Bulk SMS SDK for PHP

Latest Version on Packagist Tests Total Downloads

Mobivate Bulk SMS SDK for PHP:

TODO List:

  • Search Message Logs
  • Search for Single Message Log

Additional:

Installation

You can install the package via composer:

composer require jadessoriano/mobivate-sdk-php

Single Send SMS Message

use Jadessoriano\Mobivate\Client\Credentials\Basic;
use Jadessoriano\Mobivate\Client\Sms\SendSingle;
use Jadessoriano\Mobivate\MobivateClient;
use Jadessoriano\Mobivate\Requests\Sms\Message;

$client = new MobivateClient(
    new Basic('api_live_abcd1234efgh5678ijkl9012mnop3456')
);

$response = (new SendSingle($client))
    ->execute(
        new Message(
            originator: 'Test',             // Optional: defaults to config value if not provided
            recipient: '44700011122',
            body: 'This is a test message',
            reference: 'sample',            // Optional: defaults to null if not provided
            campaignId: '1-xxx'             // Optional: defaults to null if not provided
        )
    )

Send Batch SMS Messages

use Jadessoriano\Mobivate\Client\Credentials\Basic;
use Jadessoriano\Mobivate\Client\Sms\SendBatch;
use Jadessoriano\Mobivate\MobivateClient;
use Jadessoriano\Mobivate\Requests\Sms\Batch\BatchMessage;
use Jadessoriano\Mobivate\Requests\Sms\Batch\BatchMessageItem;

$client = new MobivateClient(
    new Basic('api_live_abcd1234efgh5678ijkl9012mnop3456')
);

/**
 * Note: The schedule date time (for later delivery) is optional, defaults to null if not provided.
 */
$message = (new BatchMessage())
    ->setMessages([
        new BatchMessageItem(
            originator: 'Test', // Optional: defaults to config value if not provided
            recipient: '44700011122',
            text: 'This is a test message'
        )
    ])
    ->setScheduleDateTime(
        new DateTime('+5 minutes', new DateTimeZone('Asia/Manila'))
    )

$response = (new SendBatch($client))->execute($message)

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

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