jplarar/facturama-bundle

A simple Symfony2+ bundle for the API for Facturama.

2.1.1 2023-04-06 03:29 UTC

This package is auto-updated.

Last update: 2024-04-06 05:30:50 UTC


README

A simple Symfony2 bundle for the API for AWS Facturama.

Setup

Step 1: Download JplararFacturamaBundle using composer

Add Facturama Bundle in your composer.json:

{
    "require": {
        "jplarar/facturama-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update "jplarar/facturama-bundle"

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Jplarar\FacturamaBundle\JplararFacturamaBundle()
    );
}

Step 3: Add configuration

# app/config/config.yml
jplarar_facturama:
      facturama_username:    %facturama_username%
      facturama_password:    %facturama_password%
      serie:                 %serie%
      currency:              %currency%
      expedition_place:      %expedition_place%
      cfdi_use:              %cfdi_use%
      payment_form:          %payment_form%
      unit_code:             %unit_code%
      unitCode:              %unitCode%
      taxes:                 %taxes%
      env:                   %env%

Usage

Using service

<?php
        $facturamaClient = $this->get('facturama_client');
?>

##Example

###Upload new file to Facturama

<?php 
    $facturamaClient->write($key, $content, $mimeType);
?>