GithubHelp home page GithubHelp logo

laravel-revolut's Introduction

Laravel Revolut Build Status

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

laravel-revolut's People

Contributors

nxu avatar vdbelt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.