sverraest/revolut-php-bundle

Symfony PHP Bundle for the Revolut Business API

v1.0.1 2018-04-08 13:59 UTC

This package is auto-updated.

Last update: 2024-11-13 02:09:24 UTC


README

Symfony Bundle for RevolutPHP - https://github.com/sverraest/revolut-php

Build Status codecov Scrutinizer Code Quality Maintainability

Installation

This bundle is for Symfony3 and higher.

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require sverraest/revolut-php-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Sverraest\RevolutPHPBundle\SverraestRevolutPHPBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Add configuration

You must specify the following configuration

sverraest_revolut_php:
    api_key: 'foo'
    mode: 'production' # options are production or sandbox

Step 4: Get the RevolutPHP Service

You can get an instance of the public RevolutPHP Service or autowire it.

// src/AppBundle/Controller/AcmeController.php
...

$revolut = $this->get('revolut_php.client');
print_r($revolut->accounts->all())

...

Or via autowiring:

// src/AppBundle/Service/AcmeService.php
...

public function __construct(RevolutPHP\Client $client) 
{
    $this->client = $client;
}

...

Documentation

Read the documentation for this bundle

www.appfleet.uk