PHP code example of vdbelt / laravel-revolut

1. Go to this page and download the library: Download vdbelt/laravel-revolut library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vdbelt / laravel-revolut example snippets


'providers' => [
    ...
    Vdbelt\LaravelRevolut\LaravelRevolutServiceProvider::class,
],

'aliases' => [
    ...
    'Revolut' => Vdbelt\LaravelRevolut\Facades\Revolut::class,
]

...
'revolut' => [
    'key' => 'XXXXXXXXX',
    'sandbox' => true
]
...

$accounts = Revolut::accounts()->all();
$account = Revolut::accounts()->get('foo');
$accountDetails = Revolut::accounts()->getDetails('foo');

$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);