jplarar/facturama-bundle

为Facturama API提供的简单Symfony2+扩展包。

安装: 27

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:symfony-bundle

2.1.1 2023-04-06 03:29 UTC

This package is auto-updated.

Last update: 2024-09-06 06:16:50 UTC


README

为AWS Facturama API提供的简单Symfony2扩展包。

配置

步骤 1:使用composer下载JplararFacturamaBundle

在composer.json中添加Facturama Bundle

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

现在运行以下命令让composer下载扩展包

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

步骤 2:启用扩展包

在kernel中启用扩展包

<?php
// app/AppKernel.php

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

步骤 3:添加配置

# 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%

使用方法

使用服务

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

##示例

###上传新文件到Facturama

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