jplarar / facturama-bundle
为Facturama API提供的简单Symfony2+扩展包。
2.1.1
2023-04-06 03:29 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^6.0
- symfony/config: ^2.0 || ^3.0 || ^4.0
- symfony/dependency-injection: ^2.0 || ^3.0 || ^4.0
- symfony/framework-bundle: ^2.0 || ^3.0 || ^4.0
- symfony/http-foundation: ^2.0 || ^3.0 || ^4.0
- symfony/http-kernel: ^2.0 || ^3.0 || ^4.0
- symfony/options-resolver: ^2.0 || ^3.0 || ^4.0
- symfony/security: ^2.0 || ^3.0 || ^4.0
- symfony/validator: ^2.0 || ^3.0 || ^4.0
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); ?>