2017 © Pedro Peláez
 

library payrexx

Payrexx PHPLib

image

payrexx/payrexx

Payrexx PHPLib

  • Thursday, June 21, 2018
  • by ukramer
  • Repository
  • 4 Watchers
  • 2 Stars
  • 908 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 12 Versions
  • 63 % Grown

The README.md

payrexx-php SDK

Overview

This is the official PHP client library for the Payrexx API, supporting API version 1.0 - 1.11. It enables easy integration with Payrexx payment services from your PHP applications., (*1)


Versioning

  • This client library targets Payrexx API version 1.11.
  • Make sure to use the compatible library version to avoid compatibility issues.
  • The current stable release is 2.0.0, which requires PHP 8.0 or higher.

Requirements

  • PHP version: 8.0 or higher (recommended from version 2.0.0 onwards)
  • PHP modules: cURL extension enabled

Installation

If you do not have Composer installed, please visit https://getcomposer.org/download/ for installation instructions., (*2)

Add Payrexx SDK to your project via Composer:, (*3)

composer require payrexx/payrexx

Alternatively, add this to your composer.json and run composer update: - For the latest development version: JSON { "require": { "payrexx/payrexx": "dev-master" } } - For the stable version 2.0.0: JSON { "require": { "payrexx/payrexx": "2.0.0" } }, (*4)

This will install the SDK and generate the necessary autoload files., (*5)


Quick Start

  1. Instantiate the Payrexx client, (*6)

    $instance = 'your-instance-name'; // e.g., 'demo' for https://demo.payrexx.com
    $apiSecret = 'your-api-secret';   // Find this in your Payrexx instance admin panel
    
    $payrexx = new \Payrexx\Payrexx($instance, $apiSecret);
    
  2. Create a model object For example, to work with subscriptions:, (*7)

    use Payrexx\Models\Request\Subscription;
    
    $subscription = new Subscription();
    $subscription->setId(1);
    
  3. Call API methods, (*8)

    For example, to cancel a subscription:, (*9)

    try {
        $response = $payrexx->cancel($subscription);
        $subscriptionId = $response->getId();
    } catch (\Payrexx\PayrexxException $e) {
        // Handle errors
        echo 'Error Code: ' . $e->getCode() . PHP_EOL;
        echo 'Error Message: ' . $e->getMessage() . PHP_EOL;
    }
    

Specifying the API Version

The Payrexx PHP SDK constructor supports an optional $version parameter that allows you to specify the API version you want to use., (*10)

$instance = 'your-instance-name';
$apiSecret = 'your-api-secret';

// Specify the API version explicitly (e.g., "1.8")
$apiVersion = '1.8';

$payrexx = new \Payrexx\Payrexx(
    $instance,
    $apiSecret,
    \Payrexx\Communicator::DEFAULT_COMMUNICATION_HANDLER,
    '',           // leave empty if not using a custom API base domain
    $apiVersion   // specify the API version here
);

Using Platform Accounts (Custom API Base URL)

If you are working with Platform accounts, you must specify a custom API base domain when instantiating the client., (*11)

use Payrexx\Communicator;

$apiBaseDomain = 'your.domain.com';

$payrexx = new \Payrexx\Payrexx(
    $instance, 
    $apiSecret, 
    Communicator::DEFAULT_COMMUNICATION_HANDLER,
    $apiBaseDomain
);

Notes:, (*12)

  • $instance is the subdomain part of your unique domain.
  • For example, if your login domain is client.platform.yourcompany.com, then:
    • $instance = 'client'
    • $apiBaseDomain = 'platform.yourcompany.com'

Documentation and Support

For detailed information about the API endpoints and data models, please refer to the official Payrexx REST API documentation: https://developers.payrexx.com/v1.0/reference, (*13)

The Versions

21/06 2018

dev-master

9999999-dev https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

21/06 2018

v1.5.2

1.5.2.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

23/10 2017

v1.5.1

1.5.1.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

18/10 2017

v1.5.0

1.5.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

19/05 2017

v1.4.1

1.4.1.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

26/01 2017

v1.4.0

1.4.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

18/10 2016

v1.3.1

1.3.1.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

13/10 2016

v1.3.0

1.3.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

04/10 2015

dev-draft

dev-draft https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

04/05 2015

v1.2.0

1.2.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

23/12 2014

v1.1

1.1.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway

12/12 2014

v1.0.0

1.0.0.0 https://www.payrexx.com

Payrexx PHPLib

  Sources   Download

MIT

The Requires

  • php >=5.4

 

payment gateway