PHPackages                             genesisgateway/genesis\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. genesisgateway/genesis\_php

ActiveLibrary[Payment Processing](/categories/payments)

genesisgateway/genesis\_php
===========================

PHP Client for Genesis Payment Processing Gateway

2.2.1(4mo ago)8275.9k↓50.7%7[1 issues](https://github.com/GenesisGateway/genesis_php/issues)2MITPHPPHP &gt;=5.5.9

Since Jul 30Pushed 4mo ago19 watchersCompare

[ Source](https://github.com/GenesisGateway/genesis_php)[ Packagist](https://packagist.org/packages/genesisgateway/genesis_php)[ RSS](/packages/genesisgateway-genesis-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (84)Used By (2)

Genesis PHP
===========

[](#genesis-php)

[![Latest Stable Version](https://camo.githubusercontent.com/39e6033a9901f93f81ad489550b42724b5b9f78c67b365bf75e0b269cf3cfa65/68747470733a2f2f706f7365722e707567782e6f72672f67656e65736973676174657761792f67656e657369735f7068702f762f737461626c65)](https://packagist.org/packages/genesisgateway/genesis_php)[![Total Downloads](https://camo.githubusercontent.com/9f9a7a8fb63ee987ee9506687e72ea46812c07af8215b39aa9adc6b71faaa5cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f47656e65736973476174657761792f67656e657369735f7068702e7376673f7374796c653d666c6174)](https://packagist.org/packages/GenesisGateway/genesis_php)[![Software License](https://camo.githubusercontent.com/ef5b59ada4f12bb5a3dc4f948e83be4f8914189d6b2fb526869160e586f49e69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c6174)](LICENSE)

Overview
--------

[](#overview)

Client Library for processing payments through Genesis Payment Processing Gateway. It's highly recommended to check out "Genesis Payment Gateway API Documentation" first, in order to get an overview of Genesis's Payment Gateway API and functionality.

Requirements
------------

[](#requirements)

- PHP version 5.5.9 or newer
- PHP Extensions:
    - [BCMath](https://php.net/bcmath)
    - [CURL](https://php.net/curl) (required, only if you use the curl network interface)
    - [Filter](https://php.net/filter)
    - [Hash](https://php.net/hash)
    - [XMLReader](https://php.net/xmlreader)
    - [XMLWriter](https://php.net/xmlwriter)
    - [JSON](https://www.php.net/manual/en/book.json)
    - [OpenSSL](https://www.php.net/manual/en/book.openssl.php)
- Composer (optional)

Note: Most of the extension are part of PHP and enabled by default, however some distributions are using custom configuration that might have some of them removed/disabled.

Installation
------------

[](#installation)

#### Composer

[](#composer)

```
composer.phar require genesisgateway/genesis_php
```

Note: If you want to use the package with PHP version lower or equal to 7.4, you can use

```
composer.phar require genesisgateway/genesis_php --update-no-dev
```

#### Manual

[](#manual)

- Clone / [download](https://github.com/GenesisGateway/genesis_php/archive/master.zip) this repo

```
git clone http://github.com/GenesisGateway/genesis_php genesis_php && cd genesis_php
```

Getting Started
---------------

[](#getting-started)

### Configuration

[](#configuration)

A sample configuration file settings\_sample.ini is provided. The configuration file can be loaded via:

```
\Genesis\Config::loadSettings('/path/to/config.ini');
```

Or the configuration settings can be set manually:

```
\Genesis\Config::setEndpoint(\Genesis\Api\Constants\Endpoints::EMERCHANTPAY);
\Genesis\Config::setEnvironment(\Genesis\Api\Constants\Environments::STAGING);
\Genesis\Config::setUsername('');
\Genesis\Config::setPassword('');
\Genesis\Config::setToken('');
```

```
# Supported values: sandbox or production
environment         = sandbox

# Supported values: test, testing, staging or live, prod, production
endpoint            = ENTER_YOUR_ENDPOINT

# Credentials
username            = ENTER_YOUR_USERNAME
password            = ENTER_YOUR_PASSWORD

# Optional for WPF requests
token               = ENTER_YOUR_TOKEN

# Smart Router endpoint for Financial Transactions
# Doesn't require token
force_smart_routing = off

# Optional token for Billing Transactions API requests
billing_api_token   = ENTER_YOUR_TOKEN

[Interfaces]
# Supported values: curl or stream
network             = curl
```

### Transactions

[](#transactions)

```
