承接 seankndy/platypus 相关项目开发

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

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

seankndy/platypus

Composer 安装命令:

composer require seankndy/platypus

包简介

PHP client for the Platypus ISP Billing System API

README 文档

README

Basic usage:

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

use \SeanKndy\Platypus\Parameter;
use \SeanKndy\Platypus\ParameterArray;

try {
    $client = new \SeanKndy\Platypus\Client(
        'your.plat.server.com', 5566,
        'Some Staff', 'password'
    );
    $req = $client->createRequest('AddToPlat') // AddToPlat is a Plat API action
            ->addProperty(new Parameter('billingmeth', 'PAPER'))
            ->addProperty(new Parameter('name2', 'Test User'))
            ->addProperty(new Parameter('email', 'testing@test.com'))
            ->addProperty(new Parameter('phone', '1112223333'))
            ->addProperty(new Parameter('fax', ''))
            ->addProperty(new Parameter('username', 'testing'))
            ->addProperty(new Parameter('password', '12345'))
            ->addProperty(new Parameter('address', '1234 Test Dr.'))
            ->addProperty(new Parameter('address2', ''))
            ->addProperty(new Parameter('city', 'Gillette'))
            ->addProperty(new Parameter('state', 'WY'))
            ->addProperty(new Parameter('zip', '82718'));
    
    $response = $client->sendRequest($req); // \SeanKndy\Platypus\Response object
    
    if ($response->isSuccess()) {
        // $response->getAttributes() contains returned attributes
        $attrib = $response->getAttributes()[0];
    
        $req = $client->createRequest('ChangeStatus')
            ->addProperty(new Parameter('custid', $attrib['custid']))
            ->addParameter(new Parameter('NewStatus', 'Y'))
            ->addParameter(new Parameter('nReasonID', ''))
            ->addParameter(new Parameter('cnReasonNote', ''));

        $response = $client->sendRequest($req);
        if ($response->isSuccess()) {
            // successfully set to active
        } else {
            // handle failure
        }
    } else {
        // handle failure
    }
} catch (Exception $e) {
    // deal with critical exception
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固