blueweb/payout_one
Composer 安装命令:
composer require blueweb/payout_one
包简介
Payout API Client PHP Library
关键字:
README 文档
README
The Payout PHP library for API client.
Features
- Card payments
- Bank transfers
- Multi-language (english, slovak, czech)
- Multi-currency
Requirements
- PHP 5.5 or later
- cUrl extension enabled
- Payout account
Getting Started
Installation
Download the latest release, unpack the ZIP file and upload
Payout directory to your project library folder. Then include the init.php file.
require_once('/path-to-your-system-library/Payout/init.php');
Namespace
All the examples below assume the Bigcommerce\Api\Client class is imported into the scope with the following namespace declaration:
use Payout\Client;
Configuration
Configure Payout API Client and initialize PHP object.
$config = array( 'client_id' => 'a3f30b76-5b01-4250-9718-96d933bf91c9', 'client_secret' => '4e6fiCXTzuNwUhYjecEEOa94Ne3_zRItqUNqcJr1kMaWVsRuB7rs_nscT7HDN7be', 'sandbox' => true ); $payout = new Client($config);
Test installation
You can print library version to test the installation.
echo $payout->getLibraryVersion();
Create checkout
Prepare array with checkout data and pass it to the createCheckout() method. Response from
API POST Create checkout
is returned as PHP object.
$checkout_data = array( 'amount' => '683.50', 'currency' => 'EUR', 'customer' => [ 'first_name' => 'John', 'last_name' => 'Doe', 'email' => 'john.doe@payout.one' ], 'external_id' => '20190001', 'redirect_url' => 'https://payout.one/payment/redirect' ); $response = $payout->createCheckout($checkout_data); var_dump($response);
Basic example
Simple usage looks like:
<?php // Load Payout API Client PHP Library require_once('system/library/Payout/init.php'); // Namespace use Payout\Client; try { // Config Payout API $config = array( 'client_id' => 'a3f30b76-5b01-4250-9718-96d933bf91c9', 'client_secret' => '4e6fiCXTzuNwUhYjecEEOa94Ne3_zRItqUNqcJr1kMaWVsRuB7rs_nscT7HDN7be', 'sandbox' => true ); // Initialize Payout $payout = new Client($config); // Test installation echo $payout->getLibraryVersion(); // Create checkout $checkout_data = array( 'amount' => '683.50', 'currency' => 'EUR', 'customer' => [ 'first_name' => 'John', 'last_name' => 'Doe', 'email' => 'john.doe@payout.one' ], 'external_id' => '20190001', 'redirect_url' => 'https://payout.one/payment/redirect' ); $response = $payout->createCheckout($checkout_data); print_r($response); $checkout_details_response = $payout->getCheckout($response->{'id'}); print_r($checkout_details_response); } catch (Exception $e) { echo $e->getMessage(); }
Output of example above looks like:
1.0.1
stdClass Object
(
[amount] => 68350
[checkout_url] => https://sandbox.payout.one/checkouts/2rZz6v4Xjogmq3xMELLbR5dBnyxwkJaW
[currency] => EUR
[customer] => stdClass Object
(
[email] => john.doe@payout.one
[first_name] => John
[last_name] => Doe
)
[external_id] => 20190001
[id] => 476661
[idempotency_key] =>
[metadata] =>
[nonce] => dmc0OUljd08yUmhycldkUQ
[object] => checkout
[payment] =>
[redirect_url] => https://payout.one/payment/redirect
[signature] => 56e5469cb716c224c765359e1178667f8c652c76973aee61f03fa691cfe60484
[status] => processing
)
Version
Stable version: 1.0.1
See the CHANGELOG.md file for list off all changes.
Compatibility
- Tested with PHP 5.5
Documentation
The Payout API documentation.
License
This open-source software is licensed under the MIT License - see the LICENSE file for details.
Copyright © 2019 Payout, s.r.o.
blueweb/payout_one 适用场景与选型建议
blueweb/payout_one 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.63k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「blueweb」 「payout_one」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 blueweb/payout_one 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 blueweb/payout_one 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 blueweb/payout_one 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 6.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-05