PHPackages                             iatspayments/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. iatspayments/php

ActiveLibrary[API Development](/categories/api)

iatspayments/php
================

iATS Payments API PHP wrapper library.

2.1(8y ago)1021.9k↓33.3%5[3 issues](https://github.com/iATSPayments/PHP/issues)GPL-3.0+PHPPHP &gt;=5.4.0

Since May 8Pushed 7y ago7 watchersCompare

[ Source](https://github.com/iATSPayments/PHP)[ Packagist](https://packagist.org/packages/iatspayments/php)[ Docs](https://github.com/iatspayments/php)[ RSS](/packages/iatspayments-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

iATS PHP API Wrapper
====================

[](#iats-php-api-wrapper)

A PHP wrapper for the iATS SOAP API.

iATS Web Services provide the facility to securely process payments using credit cards, ACH, or direct debit through your website or software.

Full wrapper documentation:

iATS SOAP Web Services [overview](http://home.iatspayments.com/developers/underlying-soap-api)

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

[](#requirements)

- An account with [iATS Payments](http://www.iatspayments.com/)
    - [Request an account](http://home.iatspayments.com/iats-php-wrapper)
- NB! If you are already an iATS customer, please contact us to verify your Account settings
    - The PHP wrapper requires certain features to be set up to your existing account
    - Please [contact us](http://home.iatspayments.com/iats-php-wrapper) with your Client Code
- PHP 5.3.3 or greater
- SOAP enabled in your PHP installation

### Optional Requirements

[](#optional-requirements)

Optional requirements can be installed using Composer.

- [PHPUnit](http://phpunit.de/) (for unit testing)
- [phpDocumentor](http://www.phpdoc.org/) (for generating documentation files)

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

[](#installation)

### Using Git

[](#using-git)

- Clone the Git repository

    `$ git clone git@github.com:iATSPayments/PHP.git iATSPaymentsPHP`

### Downloading Directly

[](#downloading-directly)

- Download the latest [PHP wrapper release](https://github.com/iATSPayments/PHP/releases)
- Extract the archive to a local directory (e.g. iATSPaymentsPHP)

### Installing Optional Requirements

[](#installing-optional-requirements)

- Run the Composer installation to retrieve optional requirements for unit testing and documentation generation.

    `$ cd iATSPaymentsPHP`

    `$ composer install`

See the **Usage Examples** section for help integrating the wrapper in your application.

Running PHPUnit Tests
---------------------

[](#running-phpunit-tests)

Unit tests can be run using PHPUnit.

- In the wrapper root directory, edit `phpunit.xml`.

    - Set **IATS\_AGENT\_CODE** to `TEST88`.
    - Set **IATS\_PASSWORD** to `TEST88`.
- After installing PHPUnit via Composer, tests can be run using the following command in the wrapper root directory:

    `$ ./vendor/bin/phpunit`

Wrapper Components
------------------

[](#wrapper-components)

iATS Web Services and this wrapper are broken up into three components.

### Core

[](#core)

The core represents the base of all other services. It is responsible for connecting to the iATS API, making API calls, and error handling. The core also handles API restrictions on location-specific services and currency, preventing invalid calls being made to the API.

### CustomerLink

[](#customerlink)

The CustomerLink service is used to create and update customer records. CustomerLink may be used with the ProcessLink service to process single or recurring transactions for customers.

**iATS documentation**

- Request / response overview:
- Detailed service [guide](http://home.iatspayments.com/developers/underlying-soap-api)

### ProcessLink

[](#processlink)

The ProcessLink service is used to process single, recurring and bulk transactions for customers. ProcessLink can also be used to refund transactions.

**iATS documentation**

- Request / response overview:
- Detailed service [guide](http://home.iatspayments.com/developers/underlying-soap-api)

### ReportLink

[](#reportlink)

The ReportLink service is used to generate transaction reports for the other services. Available reports include credit / debit card transactions, rejected transactions and returns.

**iATS documentation**

- Request / response overview:
- Detailed service [guide](http://home.iatspayments.com/developers/underlying-soap-api)

Usage Examples
--------------

[](#usage-examples)

### Use Case 1 - CustomerLink - Creating a new Customer Code for credit card transactions

[](#use-case-1---customerlink---creating-a-new-customer-code-for-credit-card-transactions)

```
include '/path/to/wrapper/lib/Core.php';
include '/path/to/wrapper/lib/CustomerLink.php';

// Create and populate the request object.
$request = array(
  'customerIPAddress' => '',
  'customerCode' => '',
  'firstName' => 'Test',
  'lastName' => 'Account',
  'companyName' => 'Test Co.',
  'address' => '1234 Any Street',
  'city' => 'City',
  'state' => 'NY',
  'zipCode' => '12345',
  'phone' => '555-555-1234',
  'fax' => '555-555-4321',
  'alternatePhone' => '555-555-5555',
  'email' => 'email@test.co',
  'comment' => 'Customer code creation test.',
  'recurring' => FALSE,
  'amount' => '5',
  'beginDate' => '2014-07-01T00:00:00+00:00',
  'endDate' => '2014-08-01T00:00:00+00:00',
  'scheduleType' => 'Annually',
  'scheduleDate' => '',
  'creditCardCustomerName' => 'Test Account',
  'creditCardNum' => '4222222222222220',
  'creditCardExpiry' => '12/17',
  'mop' => 'VISA',
  'currency' => 'USD',
);

// Replace with your iATS API credentials.
$agentCode = 'TEST88';
$password = 'TEST88';

// Make the API call using the CustomerLink service.
$iats = new CustomerLink($agentCode, $password, 'NA');
$response = $iats->createCreditCardCustomerCode($request);

// Verify successful call.
if (trim($response['AUTHORIZATIONRESULT']) == 'OK')
{
  // Assign the new Customer Code to a new variable.
  $creditCardCustomerCode = $response['CUSTOMERCODE'];

  // Perform successful call logic.
}
```

### Use Case 2 - CustomerLink - Processing a credit card transation with an existing Customer Code

[](#use-case-2---customerlink---processing-a-credit-card-transation-with-an-existing-customer-code)

```
include '/path/to/wrapper/lib/Core.php';
include '/path/to/wrapper/lib/ProcessLink.php';

// Create and populate the request object.
$request = array(
  'customerIPAddress' => '',
  'customerCode' => self::$creditCardCustomerCode,
  'invoiceNum' => '00000001',
  'cvv2' => '000',
  'mop' => 'VISA',
  'total' => '5',
  'comment' => 'Process CC test with Customer Code.',
  'currency' => 'USD',
);

// Replace with your iATS API credentials.
$agentCode = 'TEST88';
$password = 'TEST88';

// Make the API call using the ProcessLink service.
$iats = new ProcessLink($agentCode, $password);
$response = $iats->processCreditCardWithCustomerCode($request);

// Verify successful call.
if (trim($response['AUTHORIZATIONRESULT']) == 'OK')
{
  // Perform successful call logic.
}
```

### Use Case 3 - ReportLink - Get credit card transation history report as CSV

[](#use-case-3---reportlink---get-credit-card-transation-history-report-as-csv)

```
include '/path/to/wrapper/lib/Core.php';
include '/path/to/wrapper/lib/ReportLink.php';

// Create and populate the request object.
$request = array(
  'fromDate' => '2014-07-01T00:00:00+00:00',
  'toDate' => '2014-08-01T00:00:00+00:00',
  'customerIPAddress' => '',
);

// Replace with your iATS API credentials.
$agentCode = 'TEST88';
$password = 'TEST88';

// Make the API call using the ReportLink service.
$iats = new ReportLink($agentCode, $password);
$response = $iats->getCreditCardPaymentBoxJournalCSV($request);

// Response should be CSV data starting with "Transaction ID,Invoice Number,Date Time"
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 83.1% 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

Every ~1270 days

Total

2

Last Release

3122d ago

Major Versions

1.0 → 2.12017-10-30

PHP version history (2 changes)1.0PHP &gt;=5.3.3

2.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1789c7da8a73383a17c32d7b119cfc64710b8e5a2f5dbe2df13977b54bfd41?d=identicon)[acerix](/maintainers/acerix)

---

Top Contributors

[![ruscoe](https://avatars.githubusercontent.com/u/87952?v=4)](https://github.com/ruscoe "ruscoe (236 commits)")[![levelos](https://avatars.githubusercontent.com/u/104897?v=4)](https://github.com/levelos "levelos (43 commits)")[![bleeDev](https://avatars.githubusercontent.com/u/482975?v=4)](https://github.com/bleeDev "bleeDev (5 commits)")

---

Tags

apipayment processing

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ebanx/ebanx

EBANX PHP library

24648.5k](/packages/ebanx-ebanx)[pay-now/paynow-php-sdk

PHP client library for accessing Paynow API

18193.9k2](/packages/pay-now-paynow-php-sdk)[everypay/everypay-php

1742.0k](/packages/everypay-everypay-php)

PHPackages © 2026

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