定制 paymentrails/php-sdk 二次开发

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

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

paymentrails/php-sdk

最新稳定版本:2.1.5

Composer 安装命令:

composer require paymentrails/php-sdk

包简介

Trolley PHP SDK

README 文档

README

Latest Stable Version

The Trolley PHP SDK provides integration access to the Trolley API.

Requirements

PHP version >= 5.4.0 is required.

The following PHP extensions are required:

curl json mbstring openssl

Installation & Usage

SDK

git clone https://github.com/PaymentRails/php-sdk.git

Composer

Install PHP Composer

To install the bindings via Composer, add the following to composer.json:

composer require paymentrails/php-sdk

Then run composer install

Getting Started

Please follow the installation procedure and then run the following:

<?php

// This line is for the Composer autoloader
require_once 'vendor/autoload.php';

// Or use this if installed via git clone
// require_once 'php-sdk/lib/autoload.php';

use PaymentRails;

// Configure API key authorization: merchantKey
PaymentRails\Configuration::environment('production');
PaymentRails\Configuration::publicKey(YOUR_PUBLIC_KEY);
PaymentRails\Configuration::privateKey(YOUR_PRIVATE_KEY);


try {
    $recipients = PaymentRails\Recipient::all();

    foreach ($recipients as $rcpt) {
      print_r($rcpt->id . "\n");
    }
} catch (Exception $e) {
    echo 'Exception when calling PaymentRails\\Recipient::all ', $e->getMessage(), PHP_EOL;
}

Documentation for API Endpoints

All URIs are available at https://docs.trolley.com/

Running SDK from Source

  1. Clone this repo.
  2. Install dependencies by running composer install from the project root.
  3. Access the SDK source code from your code by using PaymentRails namespace as per the path you put the SDK source code on.

Running the tests from SDK

To run the tests in the terminal, use the PHPUnit test suite from within the tests directory, like the following:

$ cd tests
$ ../vendor/bin/phpunit integration/RecipientTest.php

Footnotes

  1. Payment Rails is now Trolley. We're in the process of updating our SDKs to support the new domain. In this transition phase, you might still see "PaymentRails" at some places.

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 11
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-27