devsdmf/payu-php-sdk
最新稳定版本:1.0.2
Composer 安装命令:
composer require devsdmf/payu-php-sdk
包简介
Payu payment gateway SDK for PHP projects
README 文档
README
This is a SDK for PHP projects that provides a friendly and easy interface to integrate your application with the PayU payment gateway API.
This library provides a wrapper for the available API objects and a client to perform the requests.
Installation
$ composer require devsdmf/payu-php-sdk
Usage
The basic usage of the library is:
// importing the libraries use PayU\PayU, PayU\Merchant\Credentials, PayU\Transaction\Transaction; // creating a credentials instance $credentials = Credentials::factory('myKey','myLogin'); // creating a new PayU client instance $payU = PayU::factory(PayU::LANGUAGE_ENGLISH); // configuring the client $payU->setCredentials($credentials); $payU->setMerchantId('myMerchantId'); $payU->setNotifyUrl('http://foo.bar/notifications/payu'); $transaction = new Transaction(); // ... configuring the transaction object // performing the transaction $response = $payU->doPayment($transaction); // check if the payment was approved $response->isApproved(); // getting order status $response = $payU->getOrderById('orderId'); // getting the response payload $data = $response->getPayload();
API and Developers Documentation
Soon
Tests
$ composer install --dev
$ ./vendor/bin/phpunit
License
This library is licensed under the MIT License.
统计信息
- 总下载量: 12.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-20