myfatoorah / omnipay
MyFatoorah driver for the Omnipay payment processing library
                                    Fund package maintenance!
                                                                            
                                                                                                                                        barryvdh
                                                                                    
                                                                
Installs: 4 552
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3
Open Issues: 3
pkg:composer/myfatoorah/omnipay
Requires
- php: ^7.2|^8.0
 - omnipay/common: ^3.1
 - php-http/discovery: ^1.14
 - php-http/guzzle7-adapter: ^1
 
Requires (Dev)
- omnipay/tests: ^3|^4
 
- dev-master
 - v3.2.1
 - v3.2.0
 - v3.1.0
 - v3.0.2
 - v3.0.1
 - v3.0.0
 - v3.0-alpha.1
 - 2.3.x-dev
 - 2.3.2
 - v2.3.1
 - v2.3.0
 - v2.1.0
 - v2.0.0
 - 1.1.x-dev
 - v1.1.0
 - 1.0.x-dev
 - v1.0.4
 - v1.0.3
 - v1.0.2
 - v1.0.1
 - v1.0.0
 - v0.9.3
 - v0.9.2
 - v0.9.1
 - v0.9.0
 - v0.8.4
 - v0.8.3
 - v0.8.2
 - v0.8.1
 - v0.8.0
 - v0.7.1
 - v0.7.0
 - v0.6.1
 - v0.6.0
 - dev-feat-php8
 - dev-feat/add-tests
 - dev-barryvdh-travis-73_74
 - dev-guzzle6-adapter-v2
 - dev-judgej-patch-1
 - dev-delatbabel-patch-1
 
This package is not auto-updated.
Last update: 2025-11-03 07:46:39 UTC
README
MyFatoorah gateway integration for the Omnipay PHP payment processing library
Introduction
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements acapture support for Omnipay.
Installation
To install you can composer require the package;
$ composer require myfatoorah/omnipay
You can also include the package directly in the composer.json file
{
    "require": {
        "myfatoorah/omnipay": "dev-master"
    }
}
Usage
Creating a payment link
use Omnipay\Omnipay; $data = array(); $data['Amount'] = '50'; $data['OrderRef'] = 'orderId-123'; $data['Currency'] = 'KWD'; $data['returnUrl'] = 'http://websiteurl.com/callback.php'; $data['Card']['firstName'] = 'fname'; $data['Card']['lastName'] = 'lname'; $data['Card']['email'] = 'test@test.com'; // // Do a purchase transaction on the gateway $transaction = $gateway->purchase($data)->send(); if ($transaction->isSuccessful()) { $invoiceId = $transaction->getTransactionReference(); echo "Invoice Id = " . $invoiceId . "<br>"; $redirectUrl = $transaction->getRedirectUrl(); echo "Redirect Url = <a href='$redirectUrl' target='_blank'>" . $redirectUrl . "</a><br>"; } else { echo $transaction->getMessage(); }
Checking payment status
In the callback, Get Payment status for a specific Payment ID
$callBackData = ['paymentId' => '100202113817903101']; // or $callBackData = ['invoiceid' => '75896']; $callback = $gateway->completePurchase($callBackData)->send(); if ($callback->isSuccessful()) { echo "<pre>"; print_r($callback->getPaymentStatus('orderId-123', '100202113817903101')); } else { echo $callback->getMessage(); }
Make a refund
Refund a specific Payment ID
$refundData = ['paymentId' => '100202113817903101', 'Amount'=>1]; $refund = $gateway->refund($refundData)->send(); if ($refund->isSuccessful()) { echo "<pre>"; print_r($refund->getRefundInfo()); } else { echo $refund->getMessage(); }