gentor / omnipay-raiffeisen
Raiffeisen Bank BG gateway for Omnipay payment processing library
Installs: 4 455
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: ^7
- ext-json: *
- ext-openssl: *
- omnipay/common: ^3
Requires (Dev)
- omnipay/tests: ^3
This package is auto-updated.
Last update: 2024-11-14 17:59:23 UTC
README
Raiffeisen Bank E-commerce gateway for Omnipay payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Raiffeisen Bank BG support for Omnipay.
Installation
Omnipay is installed via Composer. To install, simply require league/omnipay
and gentor/omnipay-raiffeisen
with Composer:
composer require league/omnipay gentor/omnipay-raiffeisen
Basic Usage
Purchase
$gateway = Omnipay::create('Raiffeisen'); $gateway->setMerchantId($config['merchantId']) ->setTerminalId($config['terminalId']) ->setPrivateKey($config['privateKey']) ->setCurrency($config['currency']) ->setTestMode($config['testMode']) ->setGatewayCertificate($config['production_gateway_certificate']); $response = $gateway->purchase( [ 'TotalAmount' => 100, 'OrderID' => 'OrderID', ] )->send(); // Process response if ($response->isSuccessful()) { // Payment was successful print_r($response); } elseif ($response->isRedirect()) { // Redirect to offsite payment gateway $response->redirect(); } else { // Payment failed echo $response->getMessage(); }
Complete Purchase
$response = $gateway->completePurchase()->send(); print_r($response->getData()); print_r($response->isSuccessful()); print_r($response->getCode()); print_r($response->getTransactionReference());
Refund
$response = $gateway->refund([ 'TotalAmount' => 100, 'RefundAmount' => 100, 'OrderID' => 'OrderID', 'Rrn' => 'Rrn', 'ApprovalCode' => 'ApprovalCode', ])->send(); print_r($response->getData()); print_r($response->isSuccessful()); print_r($response->getCode()); print_r($response->getMessage());
Fetch Transaction
$response = $gateway->fetchTransaction([ 'TotalAmount' => 100, 'OrderID' => 'OrderID', 'PurchaseTime' => 'PurchaseTime', ])->send(); print_r($response->getData()); print_r($response->isSuccessful()); print_r($response->isReversal()); print_r($response->getCode()); print_r($response->getMessage()); print_r($response->getTransactionReference());
Accept Notification
$response = $gateway->acceptNotification()->send(); print_r($response->getData()); print_r($response->isSuccessful()); print_r($response->getCode()); print_r($response->getMessage()); print_r($response->getTransactionReference()); print_r($response->getTransactionStatus()); print_r($response->getBody());
Pay By Token
$response = $gateway->payByToken([ 'TotalAmount' => 100, 'OrderID' => 'OrderID', 'UPCToken' => 'UPCToken', ])->send(); print_r($response->getData()); print_r($response->isSuccessful()); print_r($response->getCode()); print_r($response->getMessage()); print_r($response->getTransactionReference()); print_r($response->getTransactionStatus()); print_r($response->getBody());