verotel/flexpay-php-client
最新稳定版本:5.1.1
Composer 安装命令:
composer require verotel/flexpay-php-client
包简介
A client to Verotel FlexPay online payment gateway
README 文档
README
This library allows you to use Verotel payment gateway and accept credit cards and other payment methods on your website.
Official Documentation
Documentation for the library can be found on the Control Center website.
Installation via Composer
composer require verotel/flexpay-php-client
Download manually
Usage
Composer
require_once 'vendor/autoload.php';
Direct require
require_once '<path-to-flexpay-php-client>/src/Verotel/FlexPay/Client.php';
Construction of client
// get your brand instance $brand = Verotel\FlexPay\Brand::create_from_merchant_id(/* Your customer ID */ '9804000000000000'); $flexpayClient = new Verotel\FlexPay\Client(/* shop ID */ 12345, "FlexPay Signature Key", $brand);
Obtaining of purchase payment url
$purchaseUrl = $flexpayClient->get_purchase_URL([ "priceAmount" => 2.64, "priceCurrency" => "EUR", "description" => "Test purchase", ]);
Obtaining of cancel subscription url
$cancelUrl = $flexpayClient->get_cancel_subscription_URL([ "saleID" => 12345 ]);
Validation of postback parameters
if (!$flexpayClient->validate_signature($_GET)){ http_response_code(500); echo "ERROR - Invalid signature!"; exit; } // handle correct postback ... echo "OK";
License
The Verotel Flexpay PHP library is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 198.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-08