Payment Rails SDK in PHP for v1 REST APIs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tests
.gitignore
ACKNOWLEDGEMENTS.md
LICENSE
Makefile
README.md
composer.json
phpunit.xml.dist

README.md

Payment Rails PHP Library

Latest Stable Version

The Payment Rails PHP library provides integration access to the Payment Rails API.

Requirements

PHP version >= 5.4.0 is required.

The following PHP extensions are required:

curl json mbstring openssl

Installation & Usage

Library

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 http://docs.paymentrails.com/