承接 droath/recurly_client 相关项目开发

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

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

droath/recurly_client

Composer 安装命令:

composer require droath/recurly_client

包简介

Recurly REST API services.

README 文档

README

Build Status

The Recurly Client library allows you to simply interact with the exposed RESTful API Services provided by Recurly.com.

We're using the PHP Guzzle library to construct the HTTP requests for the available Recurly web services. This will give us the opportunity to leverage Guzzle and its pluggable HTTP adapters. Hopefully it will make for a more feature rich experience when handling the Recurly web services.

Requirements

The PHP library depends on PHP 5.4 or higher.

NOTE: Currently we don't support PHP:hhvm, due to HHVM not fully supporting the SimpleXMLIterator class.

Installation

Composer

If you're using Composer, you can simply add a dependency droath/recurly_client to your project's composer.json file. Here's a snippet of the composer.json.

{
    "require": {
        "droath/recurly_client": "*"
    }
}

Usage

Configuration

Set the Recurly API key and subdomain, which are defined within your Recurly Account.

<?php

$config = new \RecurlyClient\Config(
    'abcdef01234567890abcdef01234567890',
    'your-subdomain'
);
$client = new \RecurlyClient\Client($config);

Service Manager

Request types

Display the available request types for a particular Recurly service.

<?php
...

$service = new \RecurlyClient\Service\Account();
$manager = new \RecurlyClient\ServiceManager($client, $service);

$request_types = $manager->getRequestTypes();

print $request_types;

Invoke

Display the Recurly response object based on the invoked request type action.

<?php
...

$service = new \RecurlyClient\Service\Account();
$manager = new \RecurlyClient\ServiceManager($client, $service);

try {
    $response = $manager->invoke('list')->execute();
} catch (Exception $e) {
    // Handle errors here
}

print $response;

Response

Extract

Simply extract the data that was retrieved from the Recurly web service. The data can be extracted from the response in the following formats: Array, JSON, or XML.

<?php
...

try {
    $response = $manager->invoke('list')->execute();
} catch (Exception $e) {
    // Handle errors here
}

// Available formats are: array, json, xml.
$data = $response->getData()->extract('array');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固