tcgunel / omnipay-tami
Omnipay extension for Tami Payment Gateway
v2.0.0
2026-03-23 11:37 UTC
Requires
- php: ^8.3
- ext-json: *
- league/omnipay: ^3
Requires (Dev)
- brianium/paratest: *
- fzaninotto/faker: *
- laravel/pint: ^1.0
- omnipay/tests: ^4
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9
README
Tami payment gateway driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Tami support for Omnipay.
Installation
composer require tcgunel/omnipay-tami
Usage
Gateway Setup
use Omnipay\Omnipay; $gateway = Omnipay::create('Tami'); $gateway->setMerchantId('your_merchant_id'); $gateway->setMerchantUser('your_merchant_user'); $gateway->setMerchantStorekey('your_store_key'); $gateway->setMerchantPassword('kid|base64url_encoded_key'); $gateway->setTestMode(true);
Direct Payment (Non-3D)
$response = $gateway->purchase([ 'amount' => '100.00', 'currency' => 'TRY', 'transactionId' => 'ORDER-123', 'installment' => 1, 'card' => [ 'firstName' => 'John', 'lastName' => 'Doe', 'number' => '4155650100416111', 'expiryMonth' => '01', 'expiryYear' => '2030', 'cvv' => '123', ], 'clientIp' => '127.0.0.1', ])->send(); if ($response->isSuccessful()) { echo $response->getTransactionReference(); }
3D Secure Payment
$response = $gateway->purchase([ 'amount' => '100.00', 'currency' => 'TRY', 'transactionId' => 'ORDER-123', 'installment' => 1, 'secure' => true, 'returnUrl' => 'https://example.com/callback', 'card' => [ /* ... */ ], 'clientIp' => '127.0.0.1', ])->send(); if ($response->isRedirect()) { echo $response->getRedirectHtml(); // 3D Secure HTML form }
Complete 3D Secure
$response = $gateway->completePurchase([ 'transactionId' => 'ORDER-123', ])->send(); if ($response->isSuccessful()) { echo $response->getTransactionReference(); }
Cancel
$response = $gateway->cancel([ 'transactionId' => 'ORDER-123', ])->send(); if ($response->isSuccessful()) { echo 'Cancelled'; }
Refund
$response = $gateway->refund([ 'transactionId' => 'ORDER-123', 'amount' => '50.00', ])->send(); if ($response->isSuccessful()) { echo 'Refunded'; }
BIN Installment Query
$response = $gateway->binInstallment([ 'binNumber' => '415565', ])->send(); if ($response->isSuccessful()) { print_r($response->getInstallments()); }
Available Methods
| Method | Description |
|---|---|
purchase() |
Direct sale or 3D Secure initiation |
completePurchase() |
Complete 3D Secure payment |
cancel() |
Cancel/void a transaction |
refund() |
Partial or full refund |
binInstallment() |
Query installment options by BIN |
Testing
composer test
License
MIT