hmimeee/revolut
Composer 安装命令:
composer require hmimeee/revolut
包简介
A package to integrate Revolut payment gateway. Revolut is a British financial technology company that offers banking services, but as of December 2022 does not have a UK banking licence.
关键字:
README 文档
README
A package to integrate Revolut payment gateway. Revolut is a British financial technology company that offers banking services, but as of December 2022 does not have a UK banking licence.
Read the documentation below to integrate the library for your PHP Application.
Requirements
PHP 5.6.0 and later.
Composer
You can install the bindings via Composer. Run the following command:
composer require hmimeee/revolut
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Dependencies
The bindings require the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
Getting Started
Simple usage looks like:
$revolut = getRevolut([ 'env' => 'sandbox', //or, live 'key' => 'Your marchant secret key here' ]); $response = $revolut->createOrder([ 'amount' => 1210, //The amount must be the smallest currency unit like (from $12.10 to 1210) 'currency' => 'GBP', 'description' => 'An example order', //Can skip it as it's optional. 'name' => 'John Doe', //Can skip it as it's optional. 'email' => 'email@example.com', //Can skip it as it's optional. ]); if ($response['status']) { $orderId = $response['data']->id; //Keep the Order ID to verify the payment in the Webhook Endpoint. header("location:" . $response['data']->checkout_url); } else { echo $response['message']; }
Webhook Endpoint Preparing
A Post request will be sent from Revolut along with the data below:
{
"event": "ORDER_COMPLETED",
"order_id": "9fc01989-3f61-4484-a5d9-ffe768531be9",
"merchant_order_ext_ref": "Test #3928"
}
Now match with the Order ID and take your further action like the code below:
if($_POST['event'] == 'ORDER_COMPLETED') { //Match that previous $orderId with $_POST['order_id'], and take proper action. }
💥 Boom! You've done everything.
hmimeee/revolut 适用场景与选型建议
hmimeee/revolut 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「payment gateway」 「revolut」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hmimeee/revolut 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hmimeee/revolut 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hmimeee/revolut 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
Payyo Gateway for the Omnipay payment processing library
A PSR-7 compatible library for making CRUD API endpoints
Client library to send SMS using Comilio SMS Gateway API (https://www.comilio.it)
GovPayNet driver for the Omnipay payment processing library
BlueSnap driver for the Omnipay payment processing library
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-07