thatside / moneybird-bundle
A Symfony2 bundle for working with Moneybird v2
Installs: 325
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0
- beberlei/assert: ^2.7
- picqer/moneybird-php-client: dev-master
- symfony/framework-bundle: >=2.8
Requires (Dev)
- escapestudios/symfony2-coding-standard: ^3.0
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.8.5
- phpunit/phpunit: ~5.0
- squizlabs/php_codesniffer: ^3.0
- symfony/var-dumper: ^3.2
This package is not auto-updated.
Last update: 2025-03-02 06:26:36 UTC
README
MoneyBird Bundle for Symfony 2 Applications. Bundle provides wrapper for moneybird-php-client
Based on KamiLabs work
TBD!!!
Installation
1. Download:
Prefered way to install this bundle is using composer
Download the bundle with composer:
$ php composer.phar require "thatside/that-moneybird-bundle"
2. Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Thatside\MoneybirdBundle\ThatMoneybirdBundle(),
);
}
3. Configure the bundle:
Add the following configuration to your config.yml.
# app/config/config.yml
that_moneybird:
redirect_url: localhost
client_id: test_client_id
client_secret: test_client_secret
debug: false # optional parameter for test mode activation
Only first three configuration values are required to use the bundle. Redirect URL is required to be non-localhost so use any tunneling service to test. (https://github.com/beameio/beame-insta-ssl recommended).
Tokens storage
You need to set things up first to store auth code and access token somewhere.
- Redefine
that_moneybird.code_fetcher
service with your own class (useCodeFetcherInterface
for this). - Add an event subscriber listening to
moneybird.token_update
event (seeMoneybirdTokenEvent
). - Manually save authorization code after Moneybird authorization
MoneyBird Service
Core component of this bundle is MoneyBird service.
It provides simple wrapper around Picqer Moneybird class - it is available by getMoneybird()
call.
Still thinking on using __call
here...
<?php
$this->get('that_moneybird');