PHPackages                             chriskivaze/iveri-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. [API Development](/categories/api)
4. /
5. chriskivaze/iveri-php

ActiveLibrary[API Development](/categories/api)

chriskivaze/iveri-php
=====================

Wrapper around Iveri API

0.6.2(9y ago)002MITPHPPHP &gt;=5.6.4

Since Nov 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/chriskivaze/iveri-php)[ Packagist](https://packagist.org/packages/chriskivaze/iveri-php)[ RSS](/packages/chriskivaze-iveri-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (2)Used By (0)

Iveri Enterprise Integration API Package
========================================

[](#iveri-enterprise-integration-api-package)

[![Latest Stable Version](https://camo.githubusercontent.com/d5fb92ae198f21b3a88a8600ce62aa09259be7faa9c6533797c5f3461430266a/68747470733a2f2f706f7365722e707567782e6f72672f7374657068656e6c616b652f69766572692f762f737461626c65)](https://packagist.org/packages/stephenlake/iveri) [![Latest Unstable Version](https://camo.githubusercontent.com/40f3da2aa8703b14510bf884539880844b711d74de18a56263edca365deffd09/68747470733a2f2f706f7365722e707567782e6f72672f7374657068656e6c616b652f69766572692f762f756e737461626c65)](https://packagist.org/packages/stephenlake/iveri) [![Total Downloads](https://camo.githubusercontent.com/f132218a0c35a026b1d4e89c79fda6419b9ff06134205b2caeb5b82ff0b6729c/68747470733a2f2f706f7365722e707567782e6f72672f7374657068656e6c616b652f69766572692f646f776e6c6f616473)](https://packagist.org/packages/stephenlake/iveri) [![License](https://camo.githubusercontent.com/39554347ba7443af2e57f85f2d6a6429be25d6c40b75f67d391f0b346cd4dd0a/68747470733a2f2f706f7365722e707567782e6f72672f7374657068656e6c616b652f69766572692f6c6963656e7365)](https://packagist.org/packages/stephenlake/iveri)

**Iveri Enterprise** Integration API Package

- Written &amp; Documented by Stephen Lake under the MIT License
- Copyright Stephen Lake 2016

#### Requirements

[](#requirements)

- PHP &gt;= 5.6.4
- Centinel Password \[Email  for assistance (Excellent support team)\]

#### Dependencies (Handled by Composer)

[](#dependencies-handled-by-composer)

- guzzlehttp/guzzle ^6.2
- illuminate/validation ^5.3
- illuminate/support ^5.3
- illuminate/translation ^5.3
- ramsey/uuid ^3.5
- stephenlake/centinel ^1.3

Usage
-----

[](#usage)

### Example of full 3DSecured Transaction

[](#example-of-full-3dsecured-transaction)

#### Create a new configuration instance containing your Iveri account details

[](#create-a-new-configuration-instance-containing-your-iveri-account-details)

```
use StephenLake\Iveri\Objects\Configuration;

$configuration = new Configuration;
$configuration->setIveriUserGroupId('')
              ->setIveriUsername('')
              ->setIveriPassword('')
              ->setIveriApplicationId('')
              ->setIveriCertificateId('')
              ->setIveriMerchantId('')
              ->setIveriApiLive(false)
              ->setIveriCmpiProcessorId(1000)
              ->setIveriCmpiPassword('')
              ->build();

```

**Note**: The `Configuration` will not be built and cannot be used in a `Transaction` instance until it is built. If a required parameter is not set, you will be presented with a `ConfigurationValidateException` describing the missing required parameter.

#### Create a new transaction instance with a standard transaction event listener

[](#create-a-new-transaction-instance-with-a-standard-transaction-event-listener)

```
use StephenLake\Iveri\Objects\Transactions\ThreeDomainLookup;
use StephenLake\Iveri\Listeners\TransactionListener;

$ThreeDomainLookup = new ThreeDomainLookup(new TransactionListener());
$ThreeDomainLookup->setTransactionAmount('setData([
      'panHolderName'                => $ThreeDomainLookup->getTransactionPanHolderName(),
      'panNumber'                    => $ThreeDomainLookup->getTransactionPanNumber(),
      'panSecurityCode'              => $ThreeDomainLookup->getTransactionPanSecurityCode),
      'panExpiryMonth'               => $ThreeDomainLookup->getTransactionPanExpiryMonth(),
      'panExpiryYear'                => $ThreeDomainLookup->getTransactionPanExpiryYear(),
      'transactionIndex'             => $ThreeDomainLookup->getTransactionIndex(),
      'transactionReference'         => $ThreeDomainLookup->getTransactionReference(),
      'currency'                     => $ThreeDomainLookup->getTransactionCurrency(),
      'amount'                       => $ThreeDomainLookup->getTransactionAmount(),
  ]);

```

- `threeDomainSecureACSUrl` is the 3DSecure URL which the form must `POST` to. This was received when performing the 3DSecure lookup on the PAN.
- `threeDomainSecurePAREQ` is the request token received when performing the 3DSecure lookup on the PAN and must be submitted as part of the form.
- `threeDomainSecureTerminateURL` is the URL which the 3DSecure process will submit an `HTTP POST` containing the 3DSecure result. Make sure you own this endpoint and that it accepts POST.
- `threeDomainSecureID` should be a unique identifier defined by you that will be returned from the 3DSecure process after the customer has completed the authentication and will be received via an `HTTP POST` to your given `threeDomainSecureTerminateURL`.

##### Creating the View

[](#creating-the-view)

Create the HTML IFrame which will hold the 3DSecure form received after submitting the POST to the `threeDomainSecureACSUrl`:

```

```

Create the HTML Form which will submit the `POST` to the `threeDomainSecureACSUrl` and initiatlize the 3DSecure form into the IFrame.

For clarity sake, this example makes use of a templating engine to render our variables in the view, in your code you may use plain PHP syntax such as `` or whatever framework you may be using.

```

     />

    PROCEED TO 3DSECURE

```

##### Completing the 3DSecure Transaction

[](#completing-the-3dsecure-transaction)

Regardless of whether or not the 3DSecure process fails, the payload will be submitted to the `threeDomainSecureTerminateURL` given. On this endpoint, your code must handle the received response which will contain 2 important fields:

- `MD`: The unique identifier provided by you to fetch the saved transaction and complete it.
- `PaRes`: The **P**ayment **A**uthorization **Res**ponse that will be used to authorize the transaction.

At this point, an `HTTP POST` has been made your URL (`threeDomainSecureTerminateURL`) and your Iveri API, Configuration and Transaction instances have been lost, so we need to rebuild using the `MD` which is a unique identifier for our transaction.

Your `threeDomainSecureTerminateURL` should contain something like the following (Using plain PHP):

```
  use StephenLake\Iveri\Iveri;
  use StephenLake\Iveri\Objects\Configuration;
  use StephenLake\Iveri\Objects\Transactions\ThreeDomainAuthorise;
  use StephenLake\Iveri\Objects\Transactions\Debit;
  use StephenLake\Iveri\Listeners\TransactionListener;

  // Fetch the data that was posted to this endpoint
  $transactionIdentifier  = $_POST['MD'];
  $threeDomainSecurePARES = $_POST['PaRes'];

  // Fetched your cached transaction data - Pseudocode Example:
  // Depending on how you stored your lost transaction data, fetch it.
  $cachedTransactionData = cache->getWhere('identifier', '=', $transactionIdentifier);

  // Create new transaction instance for 3DS_AUTHORIZE
  $ThreeDomainAuthorise = new ThreeDomainAuthorise(new TransactionListener());
  $ThreeDomainAuthorise->setTransactionThreeDomainServerPARES(Input::get('PaRes'))
                       ->setTransactionIndex($transactionIdentifier)
                       ->setTransactionAmount($cachedTransactionData['amount'])
                       ->setTransactionPanNumber($cachedTransactionData['pan'])
                       ->setTransactionPanExpiryMonth($cachedTransactionData['panExpiryMonth'])
                       ->setTransactionPanExpiryYear($cachedTransactionData['panExpiryYear'])
                       ->setTransactionReference($cachedTransactionData['transactionReference'])
                       ->setTransactionCurrency($cachedTransactionData['currency'])
                       ->build();

  // Submit the 3DS_AUTHORIZE request
  $IveriServiceAPI->setTransaction($ThreeDomainLookup)
                  ->submitTransaction();

  if ($ThreeDomainAuthorise->fails()) {

      // Something went wrong with the 3DSecure Authorization
      // Cannot continue with transaction

      $errorCode    = $ThreeDomainLookup->getTransactionResult()->getErrorCode();
      $errorMessage = $ThreeDomainLookup->getTransactionResult()->getErrorMessage();

  } else {

     // Perform the transction settlement
     $Debit = new Debit(new TransactionListener);
     $Debit->setTransactionPanHolderName($cachedTransactionData['panHolderName'])
           ->setTransactionReference($cachedTransactionData['transactionReference'])
           ->setTransactionPanCode($cachedTransactionData['panSecurityCode'])
           ->setTransactionCurrency($cachedTransactionData['currency'])
           ->setTransactionAmount($cachedTransactionData['amount'])
           ->setTransactionPanNumber($cachedTransactionData['panNumber'])
           ->setTransactionPanExpiryMonth($cachedTransactionData['panExpiryMonth'])
           ->setTransactionPanExpiryYear($cachedTransactionData['panExpiryYear'])
           ->setTransactionIndex($cachedTransactionData['transactionIndex'])
           ->build();

     $IveriServiceAPI->setTransaction($Debit)
                     ->submitTransaction();

   if ($Debit->succeeds()) {

      // The payment succeeded
      $paymentDetail = $Debit->getTransactionResult()->getTransactionDetail();

   } else {

      // Something went wrong with the settlement
      // handle errors as you like

      $errorCode    = $ThreeDomainLookup->getTransactionResult()->getErrorCode();
      $errorMessage = $ThreeDomainLookup->getTransactionResult()->getErrorMessage();

   }

  }

```

### Extending the Transaction Listener

[](#extending-the-transaction-listener)

When constructing the `Transaction` instance, you must pass through an instance of `TransactionListener` which fires off events on certain transaction conditions. You can create your own `TransactionListener` and receive notifications of these events by can extending the default `TransactionListener` as follows.

```
class CustomTransactionListener extends TransactionListener {
  public function threeDomainLookupPrepared(Transaction $transaction){}
  public function threeDomainLookupInitiated(Transaction $transaction){}
  public function threeDomainLookupFailed(Transaction $transaction){}
  public function threeDomainLookupSucceeded(Transaction $transaction){}
  public function threeDomainAuthorizePrepared(Transaction $transaction){}
  public function threeDomainAuthorizeInitiated(Transaction $transaction){}
  public function threeDomainAuthorizeFailed(Transaction $transaction){}
  public function threeDomainAuthorizeSucceeded(Transaction $transaction){}
  public function debitPrepared(Transaction $transaction){}
  public function debitInitiated(Transaction $transaction){}
  public function debitFailed(Transaction $transaction){}
  public function debitSucceeded(Transaction $transaction){}
}

```

Then setting the transaction to use your custom TransactionListener as follows:

```
new ThreeDomainLookup(new CustomTransactionListener);

```

or

```
$ThreeDomainLookup->setTransactionListener(new CustomTransactionListener)

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3515d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6798162?v=4)[chriskivaze](/maintainers/chriskivaze)[@chriskivaze](https://github.com/chriskivaze)

---

Top Contributors

[![stephenlake](https://avatars.githubusercontent.com/u/1300442?v=4)](https://github.com/stephenlake "stephenlake (23 commits)")[![chriskivaze](https://avatars.githubusercontent.com/u/6798162?v=4)](https://github.com/chriskivaze "chriskivaze (1 commits)")

---

Tags

iveri

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chriskivaze-iveri-php/health.svg)

```
[![Health](https://phpackages.com/badges/chriskivaze-iveri-php/health.svg)](https://phpackages.com/packages/chriskivaze-iveri-php)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9772.3M122](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
