Skip to content

mkiyak/payconn-qnbfinansbank

Repository files navigation

Payconn: QNB Finansbank

QNB Finansbank gateway for Payconn payment processing library / PHP 8 için güncellendi

Build Status Total Downloads Latest Stable Version License


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 mkiyak/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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages