2017 © Pedro Peláez
 

library transactor

Offers support for interacting with different financial transaction processing platforms

image

orkestra/transactor

Offers support for interacting with different financial transaction processing platforms

  • Thursday, October 26, 2017
  • by tyler-sommer
  • Repository
  • 2 Watchers
  • 1 Stars
  • 487 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 6 Open issues
  • 15 Versions
  • 1 % Grown

The README.md

Orkestra Transactor

Build Status, (*1)

The Transactor provides payment processing functionality to any PHP 5.4+, 7.0+ project. This library contains dependencies on Symfony and supports both Symfony 2.3+ and 3.0+., (*2)

HHVM is loosely supported, but it has not been extensively tested. Please Report an Issue if you have any problems., (*3)

Supported payment processors:

  • Network Merchants credit card, ACH, and swiped transactions.
  • Authorize.Net credit card and ACH support.
  • Cash and check transactions for brick and mortar stores.
  • Points, useful as a means to keep track of account credit.

Installation

Install this project using Composer., (*4)

Add orkestra-transactor to your project by running composer require orkestra/transactor:~1.2, or by adding it to your composer.json file:, (*5)

``` json { "require": { "orkestra/transactor": "~1.2" } }, (*6)


Then run `composer install` or `composer update`. ## Usage ### Overview 1. Create Credentials 2. Create Account 3. Create Transaction 4. Process Transaction #### 1. Create Credentials Credentials are used by a Transactor to authenticate with the remote system. Each transactor has specific fields that are necessary to allow processing of transactions. You can use a given Transactor to create a default set of Credentials by calling `$transactor->createCredentials()`. ``` php <?php use Orkestra\Transactor\Entity\Credentials; use Orkestra\Transactor\Transactor\Generic\GenericTransactor; $transactor = new GenericTransactor(); $creds = $transactor->createCredentials(); foreach ($creds->getCredentials() as $k => $v) { // Enumerate the default fields required by the transactor. } // Update credentials as necessary $creds->setCredential('username', 'myuser'); $creds->setCredential('password', 'mypass');

Tip: You can inspect a Credentials entity and get its Transactor type, then pass that to the TransactorFactory to dynamically load the appropriate Transactor for a given Transaction., (*7)

2. Create Account

An Account is essentially a container of customer information. There are multiple types of Account entities, basically one type per Network type. Different Transactors support different networks. A Network is the method by which to process a transaction, such as Credt Card, ACH, or Cash., (*8)

``` php <?php, (*9)

use Orkestra\Transactor\Entity\Account;, (*10)

// A credit card $card = new Account\CardAccount(); $card->setAccountNumber('4111111111111111');, (*11)

// A bank account (used for ACH processing) $account = new Account\BankAccount(); $account->setAccountNumber('12345777'); $account->setRoutingNumber('5556713355');, (*12)



#### 3. Create Transaction A Transaction must provide the Transactor a proper Account and Credentials to allow the Transactor to process. ``` php <?php use Orkestra\Transactor\Entity\Transaction; $transaction = new Transaction(); $transaction->setAccount($account); $transaction->setCredentials($creds); $transaction->setNetwork(new Transaction\NetworkType(Transaction\NetworkType::CASH)); $transaction->setType(new Transaction\TransactionType(Transaction\TransactionType::SALE));

4. Transact

Use the Transactor to actually process the Transaction., (*13)

``` php <?php, (*14)

$result = $transactor->transact($transaction); ```, (*15)

The Versions

26/10 2017

2.0.x-dev

2.0.9999999.9999999-dev

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

26/10 2017

dev-master

9999999-dev

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

26/10 2017

1.2.0

1.2.0.0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

27/10 2015

dev-AuthorizeVoidUpdate

dev-AuthorizeVoidUpdate

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

25/09 2015

dev-FixedAuthorizeTests

dev-FixedAuthorizeTests

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

24/09 2015

dev-AuthorizeNetInfoUpdate

dev-AuthorizeNetInfoUpdate

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

19/09 2015

dev-AuthorizeUpdate

dev-AuthorizeUpdate

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

15/06 2015

dev-AuthNetErrorHandlingUpdate_0

dev-AuthNetErrorHandlingUpdate_0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

17/12 2014

dev-AbstractAccount/toString

dev-AbstractAccount/toString

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

29/01 2013

1.1.1

1.1.1.0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

28/01 2013

1.1.0

1.1.0.0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

28/01 2013

1.0.1

1.0.1.0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

27/01 2013

1.0.0

1.0.0.0

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

MIT

The Requires

 

The Development Requires

23/01 2013

1.0.0-RC2

1.0.0.0-RC2

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

The Requires

 

The Development Requires

01/01 2013

1.0.0-RC1

1.0.0.0-RC1

Offers support for interacting with different financial transaction processing platforms

  Sources   Download

The Requires

 

The Development Requires