定制 matix8981/microsms 二次开发

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

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

matix8981/microsms

Composer 安装命令:

composer require matix8981/microsms

包简介

UnOfficial API Class for MicroSMS payments

README 文档

README

Unofficial API Class for MicroSMS payments

Requirements

  • PHP 5.6+

TODO

  • Przelewy online

Composer

composer require matix8981/microsms

Inside of composer.json specify the following:

{
  "require": {
    "matix8981/microsms": "dev-master"
  }
}

Simple usage for SMS Premium Payment

Checking the SMS code on many numbers

<?php
    require_once("vendor/autoload.php");
    $settings =
    [
        "clientID" => 1234,
        "serviceID" => 1234,
    ];

    try
    {
        $api = new Matix8981\MicroSMS\SMS($settings["clientID"], $settings["serviceID"]);
        /**
         * Example return
         * array(2) { ["connect"]=> bool(true) ["data"]=> array(6) { ["status"]=> int(1) ["used"]=> NULL ["service"]=> string(4) "6205" ["number"]=> string(5) "92550" ["phone"]=> string(11) "48123456789" ["reply"]=> string(69) "Twoj kod dostepu to: XYZ. Dziekujemy za zakupy w naszym sklepie." } } 
        */
        $api->ValidateMulti($_GET["code"]);
        /**
         * Example format return
         * array(6) { ["status"]=> bool(true) ["used"]=> bool(false) ["service"]=> string(4) "6205" ["number"]=> string(5) "92550" ["phone"]=> string(11) "48123456789" ["reply"]=> string(69) "Twoj kod dostepu to: XYZ. Dziekujemy za zakupy w naszym sklepie." } 
        */
        $api->ValidateResult();
    }
    catch(Exception $error)
    {
        echo "Error: ".$error->getMessage();
    }
?>

Checking the SMS code on single number

<?php
    require_once("vendor/autoload.php");
    $settings =
    [
        "clientID" => 1234,
        "serviceID" => 1234,
    ];

    try
    {
        $api = new Matix8981\MicroSMS\SMS($settings["clientID"], $settings["serviceID"]);
        /**
         * Example return
         * array(2) { ["connect"]=> bool(true) ["data"]=> array(5) { ["status"]=> int(1) ["service"]=> string(4) "6205" ["number"]=> string(5) "92550" ["phone"]=> string(11) "48123456789" ["reply"]=> string(69) "Twoj kod dostepu to: XYZ. Dziekujemy za zakupy w naszym sklepie." } }
        */
        $api->ValidateSingle($_GET["code"], $_GET["number"]);
        /**
         * Example format return
         * array(6) { ["status"]=> bool(true) ["used"]=> bool(false) ["service"]=> string(4) "6205" ["number"]=> string(5) "92550" ["phone"]=> string(11) "48123456789" ["reply"]=> string(69) "Twoj kod dostepu to: XYZ. Dziekujemy za zakupy w naszym sklepie." } 
        */
        $api->ValidateResult();
    }
    catch(Exception $error)
    {
        echo "Error: ".$error->getMessage();
    }
?>

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固