PHPackages                             futureecom/omnipay-tranzila - 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. futureecom/omnipay-tranzila

ActiveLibrary[Payment Processing](/categories/payments)

futureecom/omnipay-tranzila
===========================

Tranzila driver for the Omnipay payment processing library

3.0.0(9mo ago)62.3k3[1 issues](https://github.com/futureecom/omnipay-tranzila/issues)MITPHPPHP ^8.3CI failing

Since Apr 16Pushed 9mo ago3 watchersCompare

[ Source](https://github.com/futureecom/omnipay-tranzila)[ Packagist](https://packagist.org/packages/futureecom/omnipay-tranzila)[ Docs](https://github.com/futureecom/omnipay-tranzila)[ RSS](/packages/futureecom-omnipay-tranzila/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (11)Versions (7)Used By (0)

Omnipay Tranzila
================

[](#omnipay-tranzila)

Tranzila gateway for Omnipay payment processing library.

**Note:** This package uses the modern Tranzila API. Redirect functionality has been removed in favor of the handshake-based iframe integration for better PCI compliance. For advanced integration details, see the official Tranzila documentation.

Documentation
-------------

[](#documentation)

- Official Tranzila API docs:
- Omnipay general usage:

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "futureecom/omnipay-tranzila": "~3.0"
    }
}
```

And run composer to update your dependencies:

```
$ composer update
```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Tranzila

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay) repository.

### Authorization

[](#authorization)

Authorization operations support two methods:

#### Method 1: Credit Card Details

[](#method-1-credit-card-details)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->authorize([
    'amount' => '10.00',
    'currency' => 'ILS',
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear' => '2025',
        'cvv' => '123'
    ]
])->send();

if ($response->isSuccessful()) {
    // authorization was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // authorization failed: display message to customer
    echo $response->getMessage();
}
```

#### Method 2: Token + Expiry

[](#method-2-token--expiry)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->authorize([
    'amount' => '10.00',
    'currency' => 'ILS',
    'token' => 'U99e9abcd81c2ca4444',
    'expiryMonth' => 12,
    'expiryYear' => 2025
])->send();

if ($response->isSuccessful()) {
    // authorization was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // authorization failed: display message to customer
    echo $response->getMessage();
}
```

### Capture

[](#capture)

Capture operations require all 4 pieces of information:

#### Method 1: Transaction Reference + Authorization Number + Token + Expiry

[](#method-1-transaction-reference--authorization-number--token--expiry)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->capture([
    'amount' => '10.00',
    'currency' => 'ILS',
    'transactionReference' => '12345', // The transaction reference from the authorization
    'authorizationNumber' => 'AUTH123', // Authorization number from the original transaction
    'token' => 'U99e9abcd81c2ca4444', // Token from the original transaction
    'expiryMonth' => 12,
    'expiryYear' => 2025
])->send();

if ($response->isSuccessful()) {
    // capture was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // capture failed: display message to customer
    echo $response->getMessage();
}
```

#### Method 2: Transaction Reference + Authorization Number + Credit Card Details

[](#method-2-transaction-reference--authorization-number--credit-card-details)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->capture([
    'amount' => '10.00',
    'currency' => 'ILS',
    'transactionReference' => '12345', // The transaction reference from the authorization
    'authorizationNumber' => 'AUTH123', // Authorization number from the original transaction
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear' => '2025',
        'cvv' => '123'
    ]
])->send();

if ($response->isSuccessful()) {
    // capture was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // capture failed: display message to customer
    echo $response->getMessage();
}
```

### Void

[](#void)

Void operations require both transaction reference and authorization number:

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->void([
    'transactionReference' => '12345', // The transaction reference to void
    'authorizationNumber' => 'AUTH123' // Authorization number from the original transaction
])->send();

if ($response->isSuccessful()) {
    // void was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // void failed: display message to customer
    echo $response->getMessage();
}
```

> **Note:** Void operations may not work on Tranzila test accounts. This is a limitation of the Tranzila sandbox environment. For more details, see the [Tranzila API documentation](https://docs.tranzila.com/).

> **Note:** Void responses have a simpler format than other transactions. A successful void returns `{"error_code":0,"message":"Success"}` without a `transaction_result` object.

### Reversal

[](#reversal)

Reversal operations require transaction reference, authorization number, and either token+expiry or card details:

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->reversal([
    'amount' => '1.00',
    'currency' => 'ILS',
    'transactionReference' => '12345', // The transaction reference to reverse
    'authorizationNumber' => 'AUTH123', // Authorization number from the original transaction
    'token' => 's0fc7b9882e722b0691', // Token from the original transaction
    'expiryMonth' => 11,
    'expiryYear' => 2028
])->send();

if ($response->isSuccessful()) {
    // reversal was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // reversal failed: display message to customer
    echo $response->getMessage();
}
```

**Alternative: Using Card Details**

```
$response = $gateway->reversal([
    'amount' => '1.00',
    'currency' => 'ILS',
    'transactionReference' => '12345',
    'authorizationNumber' => 'AUTH123',
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '11',
        'expiryYear' => '2028',
        'cvv' => '123'
    ]
])->send();
```

> **Note:** Reversal operations require the original transaction reference, authorization number, and either the token with expiry or complete card details from the original transaction.

### Verification

[](#verification)

Verification operations support two methods:

#### Method 1: Credit Card Details

[](#method-1-credit-card-details-1)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->verify([
    'amount' => '10.00',
    'currency' => 'ILS',
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear' => '2025',
        'cvv' => '123'
    ]
])->send();

if ($response->isSuccessful()) {
    // verification was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // verification failed: display message to customer
    echo $response->getMessage();
}
```

#### Method 2: Token + Expiry

[](#method-2-token--expiry-1)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->verify([
    'amount' => '10.00',
    'currency' => 'ILS',
    'token' => 'U99e9abcd81c2ca4444',
    'expiryMonth' => 12,
    'expiryYear' => 2025
])->send();

if ($response->isSuccessful()) {
    // verification was successful: update database
    $transactionReference = $response->getTransactionReference();
    print_r($response);
} else {
    // verification failed: display message to customer
    echo $response->getMessage();
}
```

### Purchase

[](#purchase)

Purchase operations support two methods:

#### Method 1: Credit Card Details

[](#method-1-credit-card-details-2)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->purchase([
    'amount' => '10.00',
    'currency' => 'ILS',
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear' => '2025',
        'cvv' => '123'
    ]
])->send();

if ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response);
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}
```

#### Method 2: Token + Expiry

[](#method-2-token--expiry-2)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->purchase([
    'amount' => '10.00',
    'currency' => 'ILS',
    'token' => 'U99e9abcd81c2ca4444',
    'expiryMonth' => 12,
    'expiryYear' => 2025
])->send();

if ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response);
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}
```

### Refund

[](#refund)

Refund operations require authorization number + transaction reference + either token+expiry OR card details:

#### Method 1: Authorization Number + Transaction Reference + Token + Expiry

[](#method-1-authorization-number--transaction-reference--token--expiry)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->refund([
    'amount' => '10.00',
    'currency' => 'ILS',
    'transactionReference' => '12345',
    'authorizationNumber' => 'AUTH123',
    'token' => 'U99e9abcd81c2ca4444',
    'expiryMonth' => 12,
    'expiryYear' => 2025
])->send();

if ($response->isSuccessful()) {
    // refund was successful: update database
    print_r($response);
} else {
    // refund failed: display message to customer
    echo $response->getMessage();
}
```

#### Method 2: Authorization Number + Transaction Reference + Credit Card Details

[](#method-2-authorization-number--transaction-reference--credit-card-details)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setAppKey('your_app_key');
$gateway->setSecret('your_secret');
$gateway->setTerminalName('your_terminal_name');

$response = $gateway->refund([
    'amount' => '10.00',
    'currency' => 'ILS',
    'transactionReference' => '12345',
    'authorizationNumber' => 'AUTH123',
    'card' => [
        'number' => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear' => '2025',
        'cvv' => '123'
    ]
])->send();

if ($response->isSuccessful()) {
    // refund was successful: update database
    print_r($response);
} else {
    // refund failed: display message to customer
    echo $response->getMessage();
}
```

Setting the Terminal Password
-----------------------------

[](#setting-the-terminal-password)

Some Tranzila API operations (such as the handshake/iframe token request) require both the terminal name and the terminal password. You can set the terminal password using:

```
$gateway->setTerminalPassword('your_terminal_password');
```

- For most payment operations (authorize, purchase, capture, refund, void, verify), only the terminal name is required.
- For the handshake (iframe token) operation, **both** terminal name and terminal password are required.

### Example: Handshake with Terminal Password

[](#example-handshake-with-terminal-password)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setTerminalName('your_terminal_name');
$gateway->setTerminalPassword('your_terminal_password');

$response = $gateway->handshake([
    'amount' => '10.00',
])->send();

if ($response->isSuccessful()) {
    $handshakeToken = $response->getHandshakeToken();
    print_r($response->getResponseData());
} else {
    echo $response->getMessage();
}
```

### Handshake (Iframe Token)

[](#handshake-iframe-token)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tranzila');
$gateway->setTerminalName('your_terminal_name');
$gateway->setTerminalPassword('your_terminal_password');

$response = $gateway->handshake([
    'amount' => '10.00',
])->send();

if ($response->isSuccessful()) {
    // Get the handshake token for iframe usage
    $handshakeToken = $response->getHandshakeToken();
    // Or get a structured array with all details
    $data = $response->getResponseData();
    print_r($data);
} else {
    // handshake failed: display message to customer
    echo $response->getMessage();
}
```

Supported Methods
-----------------

[](#supported-methods)

This gateway supports the following payment methods:

- `authorize()` - Authorize a payment (supports token+expiry or card details)
- `capture()` - Capture a previously authorized payment (requires transaction reference, authorization number, and either token+expiry or card details)
- `purchase()` - Authorize and capture a payment in one step (supports token+expiry or card details)
- `refund()` - Refund a payment (requires authorization number+transaction reference+token+expiry OR authorization number+transaction reference+card details)
- `void()` - Void a payment (requires transaction reference and authorization number)
- `reversal()` - Reverse a payment (requires transaction reference, authorization number, and either token+expiry or card details)
- `verify()` - Verify a card without charging (supports token+expiry or card details)
- `handshake()` - Get iframe token for secure payment form

Supported Currencies
--------------------

[](#supported-currencies)

The gateway supports the following currencies:

- ILS (Israeli Shekel)
- USD (US Dollar)
- EUR (Euro)
- GBP (British Pound)

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release announcements and discuss the project in general, please join the [mailing list](https://groups.google.com/forum/#!forum/omnipay) and [follow us on Twitter](https://twitter.com/thephpleague).

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance54

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~485 days

Total

5

Last Release

277d ago

Major Versions

1.x-dev → 2.0.02022-12-14

2.0.0 → 3.0.02025-08-07

PHP version history (3 changes)1.0.0PHP ^7.2 || ^7.3 || ^7.4

2.0.0PHP ^8.1

3.0.0PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![tatarysh](https://avatars.githubusercontent.com/u/6283074?v=4)](https://github.com/tatarysh "tatarysh (16 commits)")[![prwnr](https://avatars.githubusercontent.com/u/11226976?v=4)](https://github.com/prwnr "prwnr (12 commits)")[![futureecomavi](https://avatars.githubusercontent.com/u/48889697?v=4)](https://github.com/futureecomavi "futureecomavi (6 commits)")

---

Tags

paymentgatewaypaymerchantomnipaytranzila

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/futureecom-omnipay-tranzila/health.svg)

```
[![Health](https://phpackages.com/badges/futureecom-omnipay-tranzila/health.svg)](https://phpackages.com/packages/futureecom-omnipay-tranzila)
```

PHPackages © 2026

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