tcgunel/omnipay-iyzico

Omnipay extension for Iyzico

Maintainers

Package info

github.com/tcgunel/omnipay-iyzico

pkg:composer/tcgunel/omnipay-iyzico

Statistics

Installs: 669

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v4.2.0 2026-05-26 21:29 UTC

This package is auto-updated.

Last update: 2026-05-26 21:30:02 UTC


README

License Buy us a tree PHP Composer

Omnipay Iyzico Gateway

Omnipay gateway for Iyzico. All the methods of Iyzico implemented for easy usage.

Requirements

PHP Package
^8.3 v2.x

Installation

composer require tcgunel/omnipay-iyzico

Usage

$gateway = Omnipay::create('Iyzico');
$gateway->setPublicKey('your-public-key');
$gateway->setPrivateKey('your-private-key');
$gateway->setTestMode(true); // sandbox

Methods

Payment Services

  • purchase($options) — Direct charge (non-3DS) or 3D Secure enrolment
  • completePurchase($options) — Complete a 3DS checkout form payment
  • verifyEnrolment($options) — Verify 3DS bank callback (local check, no HTTP)
  • paymentInquiry($options) — Query payment status by paymentId / conversationId
  • checkoutForm($options) — iyzico hosted checkout form
  • checkoutFormInquiry($options) — Query hosted checkout form status
  • payWithIyzico($options) — Pay with iyzico wallet
  • binLookup($options) — BIN / installment lookup

Refund & Cancel

  • refund($options) — Refund a captured payment via POST /v2/payment/refund. Accepts paymentId (top-level) + price + currency; iyzico auto-selects the sub-transaction. Supports partial and full refunds.

    $response = $gateway->refund([
        'paymentId'  => 'iyzico-payment-id',
        'amount'     => '12.34',
        'currency'   => 'TRY',
        'language'   => 'tr',
        'clientIp'   => request()->ip(),
    ])->send();
    
    $response->isSuccessful(); // true / false
    $response->getMessage();   // error message on failure
    $data = $response->getData(); // RefundResponseModel
  • cancel($options) — Void a same-day payment via POST /payment/cancel. Full void only (no partial amounts); operates on paymentId. Only valid before settlement.

    $response = $gateway->cancel([
        'paymentId' => 'iyzico-payment-id',
        'language'  => 'tr',
        'clientIp'  => request()->ip(),
    ])->send();
    
    $response->isSuccessful();
    $data = $response->getData(); // CancelResponseModel

Tests

composer test

For Windows:

vendor\bin\paratest.bat

Treeware

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you'll be creating employment for local families and restoring wildlife habitats.