ahmett / payconn-qnbfinansbank
QNB Finansbank payment processing library for PHP
v1.2.0
2021-03-16 16:01 UTC
Requires
- php: >=7.1.3
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.5|^7.0.1
- payconn/common: ~1.4
- symfony/http-foundation: ^4.4|^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.12.19
- phpunit/phpunit: ^7.0
- vimeo/psalm: ^4.6
This package is auto-updated.
Last update: 2024-12-20 14:10:44 UTC
README
Payconn: QNB Finansbank
QNB Finansbank gateway for Payconn payment processing library
Installation | Supported Methods | Basic Usages
Payconn is a framework agnostic, multi-gateway payment processing library for PHP. This package implements common classes required by Payconn.
Installation
$ composer require ahmett/payconn-qnbfinansbank
Supported Methods
- purchase : authorize and immediately capture an amount
- authorize : authorize an amount on the customer's card
- complete : capture an amount you have previously authorized
- refund : refund an already processed transaction
- cancel : cancel an already processed transaction, this generally can only be called up to 24 hours after submitting a transaction
Basic Usages
Purchase Action:
use Payconn\Common\CreditCard; use Payconn\QNBFinansbank\Token; use Payconn\QNBFinansbank\Currency; use Payconn\QNBFinansbank\Model\Purchase; use Payconn\QNBFinansbank; $token = new Token('MERCHANT_ID', 'MERCHANT_PASS', 'USER_CODE', 'USER_PASS'); $creditCard = new CreditCard('NUMBER', 'EXPIRE_YEAR', 'EXPIRE_MONTH', 'CVV'); $purchase = new Purchase(); $purchase->setTestMode(true); $purchase->setCurrency(Currency::TRY); $purchase->setAmount(1); $purchase->setInstallment(0); $purchase->setCreditCard($creditCard); $purchase->generateOrderId(); $response = (new QNBFinansbank($token))->purchase($purchase); if ( $response->isSuccessful() ) { // success! }
Take a look at samples folder for more usage examples.
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.
License
The MIT License (MIT). Please see License File for more information.