concept24/omnipay-payu-romania
最新稳定版本:2.0.1
Composer 安装命令:
composer require concept24/omnipay-payu-romania
包简介
PayU Romnania driver for the Omnipay payment processing library
README 文档
README
PayU Romania driver for the Omnipay payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.6+. This package implements PayU support for Omnipay.
Installation
$ composer require keops007/omnipay-payu-romania
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize PayU gateway:
$gateway = Omnipay::create('PayU');
$gateway->setMerchantName(env('MERCHANT_NAME'));
$gateway->setSecretKey(env('SECRET_KEY'));
- Call purchase, it will automatically redirect to PayU hosted page
$purchase = $gateway->purchase([
'amount' => 100,
'transactionId' => 1,
'orderDate' => date('Y-m-d H:i:s'),
'items' => [
new \Omnipay\PayU\Item([
'name' => 'Item',
'code' => 'ItemCode',
'price' => '100',
'priceType' => 'NET',
'quantity' => 1,
'vat' => 0,
]),
]
])->send();
$purchase->redirect();
- Create a webhook controller to handle the callback request at your
RESULT_URLand catch the webhook as follows
$gateway = Omnipay::create('PayU');
$gateway->setMerchantName(env('MERCHANT_NAME'));
$gateway->setSecretKey(env('SECRET_KEY'));
$purchase = $gateway->completePurchase()->send();
if ($purchase->isSuccessful()) {
// Your logic
return $purchase->completeResponse();
}
For general usage instructions, please see the main Omnipay repository.
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
统计信息
- 总下载量: 149
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-19
