puzzle-travel / omnipay-nestpay
NestPay gateway for Omnipay payment processing library - with custom set endpoints
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/puzzle-travel/omnipay-nestpay
Requires
- php: ^8.2
- ext-dom: *
- ext-simplexml: *
- nyholm/psr7: ^1.8
- omnipay/common: ^3.5
- php-http/httplug: ^2.4
- symfony/http-client: ^8.0
Requires (Dev)
- mockery/mockery: ^1.0
- omnipay/tests: ^4.2
- phpunit/phpunit: ^9.0
README
NestPay (EST) gateway for Omnipay payment processing library with custom set endpoint
For Omnipay v3.x
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 8.2+. This package implements NestPay (Turkish Payment Gateways) support for Omnipay.
Supports the API gateway as well as the HTTP Post Gateway methods (3d_pay_hosting, 3d_pay, pay_hosting)
Installation
composer require puzzle-travel/omnipay-nestpay
Basic Usage
The following gateways are provided by this package:
- NestPay (Standard XML API)
- NestPay_Post (3D Secure and Hosting payment methods)
Gateway Methods (NestPay)
- authorize($options) - authorize an amount on the customer's card
- capture($options) - capture an amount you have previously authorized
- purchase($options) - authorize and immediately capture an amount on the customer's card
- refund($options) - refund an already processed transaction
- void($options) - generally can only be called up to 24 hours after submitting a transaction
- credit($options) - money points processed transaction
- settle($options) - settlement query processed transaction
- status($options) - returns status message of the transaction
Gateway Methods (NestPay_Post)
- authorize($options) - forwards the user via HTTP Post to gateway for a PreAuth
- purchase($options) - forwards the user via HTTP Post to gateway for an Auth
- acceptNotification($options) - accepts the result notification from the gateway
For general usage instructions, please see the main Omnipay repository.
Unit Tests
PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. No
Sample App
NestPay (XML API)
require __DIR__ . '/vendor/autoload.php'; use Omnipay\Omnipay; $gateway = Omnipay::create('NestPay'); $gateway->setUserName("DENIZTEST"); $gateway->setClientId("800100000"); $gateway->setPassword("DENIZTEST123"); $gateway->setTestMode(TRUE); $options = [ 'number' => '5406675406675403', 'expiryMonth' => '12', 'expiryYear' => '2022', 'cvv' => '000', 'email' => 'yasinkuyu@gmail.com', 'firstname' => 'Yasin', 'lastname' => 'Kuyu' ]; try { $response = $gateway->purchase( [ 'amount' => 12.00, 'currency' => 'TRY', 'transactionId' => 'ORDER-3651233', 'card' => $options ] )->send(); if ($response->isSuccessful()) { echo "Successful"; } elseif ($response->isRedirect()) { $response->redirect(); } else { exit($response->getMessage()); } } catch (\Exception $e) { exit($e->getMessage()); }
NestPay_Post (3D Secure / Hosting)
$gateway = Omnipay::create('NestPay_Post'); $gateway->setClientId("800100000"); $gateway->setStoreKey("123456"); // Store Key $gateway->setStoreType("3d_pay_hosting"); // 3d_pay_hosting, 3d_pay, pay_hosting $gateway->setTestMode(TRUE); $response = $gateway->purchase([ 'amount' => 10.00, 'currency' => 'TRY', 'transactionId' => 'ORDER-123456', 'okUrl' => 'https://www.example.com/ok', 'failUrl' => 'https://www.example.com/fail', ])->send(); if ($response->isRedirect()) { $response->redirect(); } else { echo $response->getMessage(); }
Posnet
Posnet (Yapı Kredi, Vakıfbank, Anadolubank) gateway for Omnipay payment processing library https://github.com/yasinkuyu/omnipay-posnet
Iyzico
Iyzico gateway for Omnipay payment processing library https://github.com/yasinkuyu/omnipay-iyzico
GVP (Granti Sanal Pos)
Gvp (Garanti, Denizbank, TEB, ING, Şekerbank, TFKB) gateway for Omnipay payment processing library https://github.com/yasinkuyu/omnipay-gvp
BKM Express
BKM Express gateway for Omnipay payment processing library https://github.com/yasinkuyu/omnipay-bkm
Paratika
Paratika (Asseco) (Akbank, TEB, Halkbank, Finansbank, İş Bankası, Şekerbank, Vakıfbank ) gateway for Omnipay payment processing library https://github.com/yasinkuyu/omnipay-paratika
Composer Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json file:
{
"require": {
"puzzle-travel/omnipay-nestpay": "^1.0"
}
}
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Support
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.
Roadmap
3D Secure payment