sverraest / revolut-php-bundle
Symfony PHP Bundle for the Revolut Business API
Requires
- sverraest/revolut-php: ~1.1
- symfony/framework-bundle: ^3.0 || ^4.0
Requires (Dev)
- phpunit/phpunit: ^5.7.11|^6.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.1
- symfony/console: ^3.0 || ^4.0
- symfony/phpunit-bridge: ^3.0 || ^4.0
- symfony/yaml: ^3.0 || ^4.0
This package is auto-updated.
Last update: 2024-10-13 02:02:27 UTC
README
Symfony Bundle for RevolutPHP - https://github.com/sverraest/revolut-php
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