vdbelt/laravel-revolut
最新稳定版本:v1.1
Composer 安装命令:
composer require vdbelt/laravel-revolut
包简介
A Laravel wrapper for the Revolut Business API
README 文档
README
Laravel wrapper for the revolut-php package developed by Simon Verraest
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:
$ composer require vdbelt/laravel-revolut
Laravel 5.5+ will use the auto-discovery function.
In Laravel 5.4 (or if you are not using auto-discovery) register the service provider by adding it to the providers key in config/app.php. Also register the facade by adding it to the aliases key in config/app.php.
'providers' => [ ... Vdbelt\LaravelRevolut\LaravelRevolutServiceProvider::class, ], 'aliases' => [ ... 'Revolut' => Vdbelt\LaravelRevolut\Facades\Revolut::class, ]
Configuration
Add the following section to your config/services.php configuration file:
... 'revolut' => [ 'key' => 'XXXXXXXXX', 'sandbox' => true ] ...
Usage
Here you can see a few examples of just how simple this package is to use.
Accounts API
$accounts = Revolut::accounts()->all(); $account = Revolut::accounts()->get('foo'); $accountDetails = Revolut::accounts()->getDetails('foo');
Payments API
$payment = [ 'request_id' => 'e0cbf84637264ee082a848b', 'account_id' => 'bdab1c20-8d8c-430d-b967-87ac01af060c', 'receiver' => [ 'counterparty_id' => '5138z40d1-05bb-49c0-b130-75e8cf2f7693', 'account_id' => 'db7c73d3-b0df-4e0e-8a9a-f42aa99f52ab' ], 'amount' => 123.11, 'currency' => 'EUR', 'reference' => 'Invoice payment #123' ]; $payment = Revolut::payments()->create($payment);
For more examples, check out the usage intructions for revolut-php
统计信息
- 总下载量: 4.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-23