margitin/omnipay-ubb
最新稳定版本:v1.0.1
Composer 安装命令:
composer require margitin/omnipay-ubb
包简介
UBB Bank Bulgaria UPC gateway for Omnipay payment processing library
README 文档
README
UBB 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 margitin/omnipay-ubb with Composer:
composer require league/omnipay margitin/omnipay-ubb
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());
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-17