承接 contactamx/sms 相关项目开发

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

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

contactamx/sms

最新稳定版本:v1.0.0

Composer 安装命令:

composer require contactamx/sms

包简介

Send transactional sms

README 文档

README

Documentation at https://www.contacta.mx

Get started fast and easy!

IssuesNeed transactional SMSInfo, Cost and More

Installation

> composer require contactamx/sms

Getting started

<?php

    require('vendor/autoload.php');

    use Contactamx\Sms\Bulker;
    $bulker = new Bulker();
    $bulker->setToken(YOUR_TOKEN_PROVIDED_BY_CONTACTA);
    
    // For send sms transactional
    $result = $bulker->sendMessage(YOUR_PHONE,YOUR_MESSAGE);
    if ($result->success) {
        
        echo "The id of the message is " . $result->id .PHP_EOL;
        echo "The message sent on  " . $result->added_on .PHP_EOL;
        echo "Additional data " . print_r($result->country, true) .PHP_EOL;
    
        $get_log = $bulker->check($result->id);
        print_r($get_log);
    }
    else{
        echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ;
    }
    
    // For send flash transactional
    $result = $bulker->sendFlash(YOUR_PHONE,YOUR_MESSAGE);
    if ($result->success) {
        
        echo "The id of the message is " . $result->id .PHP_EOL;
        echo "The message sent on  " . $result->added_on .PHP_EOL;
        echo "Additional data " . print_r($result->country, true) .PHP_EOL;
    
        $get_log = $bulker->check($result->id);
        print_r($get_log);
    }
    else{
        echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ;
    }

    // For send otp message
    $result = $bulker->sendOtp(YOUR_PHONE,YOUR_MESSAGE);
    if ($result->success) {
        
        echo "The id of the message is " . $result->id .PHP_EOL;
        echo "The message sent on  " . $result->added_on .PHP_EOL;
        echo "Additional data " . print_r($result->country, true) .PHP_EOL;
    
        $get_log = $bulker->check($result->id);
        print_r($get_log);
    
        $verify_otp = $bulker->verifyOtp(YOUR_PHONE,YOUR_OTP_CODE);
        print_r($result);
    }
    else{
        echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ;
    }
    
?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-07-26