2017 © Pedro Peláez
 

symfony-bundle moneybird-bundle

A Symfony2 bundle for working with Moneybird v2

image

thatside/moneybird-bundle

A Symfony2 bundle for working with Moneybird v2

  • Friday, March 16, 2018
  • by thatside
  • Repository
  • 1 Watchers
  • 0 Stars
  • 292 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

ThatMoneybirdBundle

Build Status, (*1)

MoneyBird Bundle for Symfony 2 Applications. Bundle provides wrapper for moneybird-php-client, (*2)

Based on KamiLabs work, (*3)

TBD!!!, (*4)

Installation

1. Download:

Prefered way to install this bundle is using composer, (*5)

Download the bundle with composer:, (*6)

$ 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., (*7)

# 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)., (*8)

Tokens storage

You need to set things up first to store auth code and access token somewhere. 1. Redefine that_moneybird.code_fetcher service with your own class (use CodeFetcherInterface for this). 2. Add an event subscriber listening to moneybird.token_update event (see MoneybirdTokenEvent). 3. Manually save authorization code after Moneybird authorization, (*9)

MoneyBird Service

Core component of this bundle is MoneyBird service. It provides simple wrapper around Picqer Moneybird class - it is available by getMoneybird() call., (*10)

Still thinking on using __call here..., (*11)

<?php
    $this->get('that_moneybird'); 

The Versions