PHPackages                             tcgunel/omnipay-nestpay - 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. tcgunel/omnipay-nestpay

ActiveLibrary[Payment Processing](/categories/payments)

tcgunel/omnipay-nestpay
=======================

Omnipay extension for NestPay (Asseco) - Supports 12 Turkish banks

v2.0.0(3mo ago)02MITPHPPHP ^8.3CI passing

Since Mar 23Pushed 3mo agoCompare

[ Source](https://github.com/tcgunel/omnipay-nestpay)[ Packagist](https://packagist.org/packages/tcgunel/omnipay-nestpay)[ Docs](https://github.com/tcgunel/omnipay-nestpay)[ RSS](/packages/tcgunel-omnipay-nestpay/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

Omnipay: NestPay (Asseco)
=========================

[](#omnipay-nestpay-asseco)

**NestPay (Asseco) gateway for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements NestPay (Asseco) support for Omnipay.

Supported Banks
---------------

[](#supported-banks)

NestPay is used by 12 Turkish banks sharing the same XML-over-HTTP protocol with different endpoint URLs:

BankConstantAkbank`Bank::AKBANK`Alternatif Bank`Bank::ALTERNATIFBANK`Anadolu Bank`Bank::ANADOLUBANK`CardPlus`Bank::CARDPLUS`Halkbank`Bank::HALKBANK`ING Bank`Bank::INGBANK`Is Bankasi`Bank::ISBANKASI`Finansbank`Bank::FINANSBANK`Sekerbank`Bank::SEKERBANK`TEB`Bank::TEB`Turkiye Finans`Bank::TURKIYEFINANS`Ziraat Bankasi`Bank::ZIRAATBANKASI`Installation
------------

[](#installation)

```
composer require tcgunel/omnipay-nestpay
```

Available Methods
-----------------

[](#available-methods)

MethodDescription`purchase()`Direct (non-3D) sale or 3D Secure redirect`completePurchase()`Complete 3D Secure payment after bank callback`void()`Cancel/void a transaction`refund()`Refund a transaction (full or partial)`fetchTransaction()`Query order statusUsage
-----

[](#usage)

### Gateway Initialization

[](#gateway-initialization)

```
use Omnipay\Omnipay;
use Omnipay\Nestpay\Constants\Bank;

$gateway = Omnipay::create('Nestpay');

$gateway->setBank(Bank::AKBANK);
$gateway->setMerchantUser('your_api_user');
$gateway->setMerchantPassword('your_api_password');
$gateway->setMerchantId('your_client_id');
$gateway->setMerchantStorekey('your_store_key'); // Required for 3D Secure
$gateway->setTestMode(true); // Use test endpoints
```

### Non-3D Purchase (Direct Sale)

[](#non-3d-purchase-direct-sale)

```
$response = $gateway->purchase([
    'amount' => '100.00',
    'currency' => 'TRY',
    'transactionId' => 'ORDER-12345',
    'installment' => '1',
    'secure' => false,
    'card' => [
        'number' => '4355084355084358',
        'expiryMonth' => '12',
        'expiryYear' => '2030',
        'cvv' => '000',
    ],
])->send();

if ($response->isSuccessful()) {
    echo 'Transaction ID: ' . $response->getTransactionReference();
} else {
    echo 'Error: ' . $response->getMessage();
}
```

### 3D Secure Purchase

[](#3d-secure-purchase)

```
$response = $gateway->purchase([
    'amount' => '100.00',
    'currency' => 'TRY',
    'transactionId' => 'ORDER-12345',
    'installment' => '1',
    'secure' => true,
    'returnUrl' => 'https://yoursite.com/payment/success',
    'cancelUrl' => 'https://yoursite.com/payment/fail',
    'card' => [
        'number' => '4355084355084358',
        'expiryMonth' => '12',
        'expiryYear' => '2030',
        'cvv' => '000',
    ],
])->send();

if ($response->isRedirect()) {
    $response->redirect(); // Redirects to bank 3D Secure page
}
```

### Complete 3D Secure Purchase (Callback Handler)

[](#complete-3d-secure-purchase-callback-handler)

After the bank redirects back to your `returnUrl`:

```
$response = $gateway->completePurchase([
    'amount' => '100.00',
    'currency' => 'TRY',
    'transactionId' => 'ORDER-12345',
    'md' => $_POST['md'],
    'xid' => $_POST['xid'],
    'eci' => $_POST['eci'],
    'cavv' => $_POST['cavv'],
    'mdStatus' => $_POST['mdStatus'],
])->send();

if ($response->isSuccessful()) {
    echo 'Payment confirmed! Transaction: ' . $response->getTransactionReference();
} else {
    echo 'Payment failed: ' . $response->getMessage();
}
```

### Void (Cancel)

[](#void-cancel)

```
$response = $gateway->void([
    'transactionReference' => '22302MsqJ11025',
])->send();

if ($response->isSuccessful()) {
    echo 'Transaction voided.';
}
```

### Refund

[](#refund)

```
$response = $gateway->refund([
    'transactionReference' => '22302MsqJ11025',
    'amount' => '50.00',
    'currency' => 'TRY',
])->send();

if ($response->isSuccessful()) {
    echo 'Refund processed.';
}
```

### Fetch Transaction (Order Status Query)

[](#fetch-transaction-order-status-query)

```
$response = $gateway->fetchTransaction([
    'orderId' => 'ORDER-12345',
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData();
    echo 'Order status retrieved.';
}
```

Test Credentials
----------------

[](#test-credentials)

The Asseco test platform is shared by all banks:

SettingValueTest API URL`https://entegrasyon.asseco-see.com.tr/fim/api`Test 3D URL`https://entegrasyon.asseco-see.com.tr/fim/est3Dgate`Test Panel`https://entegrasyon.asseco-see.com.tr/{bank}/report/user.login`Banks with custom test endpoints:

- **Is Bankasi**: `https://istest.asseco-see.com.tr/fim/api`
- **Ziraat Bankasi**: `https://torus-stage-ziraat.asseco-see.com.tr/fim/api`

Test card numbers and credentials are provided through the Asseco test panel for your merchant account.

Running Tests
-------------

[](#running-tests)

```
composer test
```

Static Analysis
---------------

[](#static-analysis)

```
composer analyse
```

Code Style
----------

[](#code-style)

```
composer lint
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

96d ago

Major Versions

v1.0.0 → v2.0.02026-03-23

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

v2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/36dffe883e88aeef07c26067af3d6a7eda1c2a81f1ae45fdd430b721665131da?d=identicon)[Mobius Studio](/maintainers/Mobius%20Studio)

---

Top Contributors

[![tcgunel](https://avatars.githubusercontent.com/u/3923425?v=4)](https://github.com/tcgunel "tcgunel (6 commits)")

---

Tags

paymentgatewayomnipayakbankIsbank3d-securefinansbanknestpayHalkbankAnadolubankCardplusTEBziraatSekerbankassecoingbankturkiyefinansalternatifbank

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tcgunel-omnipay-nestpay/health.svg)

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

PHPackages © 2026

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