Giter VIP home page Giter VIP logo

trolley-php-sdk-gaps's Introduction

Trolley PHP SDK (Previously Payment Rails1)

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. โ†ฉ

trolley-php-sdk-gaps's People

Contributors

aciotola avatar aman-aalam avatar barnett avatar bassochette avatar fronugget avatar koblas avatar mattgartz avatar stefblokdijk avatar techhdan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.