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

ActiveLibrary[Payment Processing](/categories/payments)

tcgunel/omnipay-yapikredi
=========================

Omnipay extension for Yapi Kredi (Posnet)

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

Since Mar 23Pushed 3mo agoCompare

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

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

Omnipay: Yapikredi (Posnet)
===========================

[](#omnipay-yapikredi-posnet)

**Yapikredi (Posnet) gateway for the Omnipay PHP payment processing library.**

[![Latest Stable Version](https://camo.githubusercontent.com/bb08c0ce301892e1c654e93496a6ed569cde8a523fc0487021dc3c0f073ecd3b/68747470733a2f2f706f7365722e707567782e6f72672f746367756e656c2f6f6d6e697061792d796170696b726564692f762f737461626c65)](https://packagist.org/packages/tcgunel/omnipay-yapikredi)[![Total Downloads](https://camo.githubusercontent.com/0fdcfb5fb75d675081fe6b90a8154b063496e8f50a4c82ee1ef52c7a9a500e56/68747470733a2f2f706f7365722e707567782e6f72672f746367756e656c2f6f6d6e697061792d796170696b726564692f646f776e6c6f616473)](https://packagist.org/packages/tcgunel/omnipay-yapikredi)[![License](https://camo.githubusercontent.com/2de4417d359baeda928b4c2d18160cc0923ff9f7a9abb7a412fd5ffc2d5e4a0d/68747470733a2f2f706f7365722e707567782e6f72672f746367756e656c2f6f6d6e697061792d796170696b726564692f6c6963656e7365)](https://packagist.org/packages/tcgunel/omnipay-yapikredi)

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

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

[](#installation)

```
composer require tcgunel/omnipay-yapikredi
```

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

[](#requirements)

- PHP &gt;= 8.0
- ext-simplexml
- ext-dom

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

[](#supported-methods)

MethodDescription`purchase()`Non-3D direct sale via Posnet XML API`enrolment()`3D Secure enrolment (oosRequestData + redirect)`completePurchase()`3D Secure completion (oosResolveMerchantData + oosTranData)Not Implemented
---------------

[](#not-implemented)

The following features are **not available** through the CP.VPOS Posnet integration:

- **Cancel/Refund**: Not supported (returns error). Use the Yapikredi merchant panel instead.
- **Sale Query**: Not supported through this API.
- **Installment/BIN Query**: Not available through Posnet.

Credentials
-----------

[](#credentials)

ParameterDescription`merchantId`Merchant ID (mid)`terminalId`Terminal ID (tid)`posnetId`Posnet ID (merchant password)`storeKey`Store key for 3D Secure hash generationEndpoints
---------

[](#endpoints)

EnvironmentAPI URL3D URLTestProductionTest panel:

Usage
-----

[](#usage)

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

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

```
use Omnipay\Omnipay;

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

$gateway->setMerchantId('6706598320');
$gateway->setTerminalId('67005551');
$gateway->setPosnetId('1010028724');
$gateway->setTestMode(true);

$response = $gateway->purchase([
    'amount'        => '1.50',
    'currency'      => 'TRY',
    'transactionId' => 'ORDER-001',
    'installment'   => 1,
    'card'          => [
        'number'      => '4506349116608409',
        'expiryMonth' => '03',
        'expiryYear'  => '2030',
        'cvv'         => '000',
    ],
])->send();

if ($response->isSuccessful()) {
    echo "Transaction Reference: " . $response->getTransactionReference();
} else {
    echo "Error: " . $response->getMessage();
    echo "Code: " . $response->getCode();
}
```

### 3D Secure Payment (enrolment + completePurchase)

[](#3d-secure-payment-enrolment--completepurchase)

#### Step 1: Enrolment (redirect to 3D page)

[](#step-1-enrolment-redirect-to-3d-page)

```
$response = $gateway->enrolment([
    'amount'        => '1.50',
    'currency'      => 'TRY',
    'transactionId' => 'ORDER-001',
    'installment'   => 1,
    'returnUrl'     => 'https://example.com/payment/callback',
    'storeKey'      => '10,10,10,10,10,10,10,10',
    'card'          => [
        'number'      => '4506349116608409',
        'expiryMonth' => '03',
        'expiryYear'  => '2030',
        'cvv'         => '000',
    ],
])->send();

if ($response->isRedirect()) {
    $response->redirect(); // Redirects to 3D Secure page
} else {
    echo "Error: " . $response->getMessage();
}
```

#### Step 2: Complete Purchase (after 3D callback)

[](#step-2-complete-purchase-after-3d-callback)

```
// In your callback URL handler:
$response = $gateway->completePurchase([
    'amount'         => '1.50',
    'currency'       => 'TRY',
    'transactionId'  => 'ORDER-001',
    'storeKey'       => '10,10,10,10,10,10,10,10',
    'bankPacket'     => $_POST['BankPacket'],
    'merchantPacket' => $_POST['MerchantPacket'],
    'sign'           => $_POST['Sign'],
])->send();

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

Posnet Protocol Notes
---------------------

[](#posnet-protocol-notes)

- **Amount Format**: Multiplied by 100, no decimals (e.g., 1.50 TRY = "150")
- **Currency Codes**: TRY = "TL", USD = "US", EUR = "EU"
- **Order ID**: Padded with leading zeros to 24 characters
- **Expiry Date**: YYMM format (e.g., March 2030 = "3003")
- **Installment**: "00" for single payment, "02"-"12" for installments
- **3D Secure Hash**: SHA256 based. First hash: `SHA256(storeKey + ";" + terminalId)`, MAC: `SHA256(xid + ";" + amount + ";" + currency + ";" + mid + ";" + firstHash)`

Testing
-------

[](#testing)

```
composer test
```

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 ^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

paymentgatewayomnipayyapikredisanal-posposnet3d-secure3d ödeme

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[yasinkuyu/omnipay-iyzico

Iyzico gateway for Omnipay payment processing library

137.3k](/packages/yasinkuyu-omnipay-iyzico)

PHPackages © 2026

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