thedarsideofit/afip-bundle

AFIP的Web服务,适用于symfony 2.x

安装: 11

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 4

类型:symfony-bundle

v0.5.1 2018-10-27 00:24 UTC

This package is auto-updated.

Last update: 2024-09-20 06:01:32 UTC


README

AFIP的Web服务

安装


Applications that use Symfony 2.x
----------------------------------------

### Step 1: Download the Bundle

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:

```console
$ composer require thedarsideofit/afip-bundle

此命令要求您全局安装Composer,具体请参阅Composer文档中的安装章节

步骤2:启用Bundle

然后,通过将其添加到项目中的app/AppKernel.php文件中已注册的Bundle列表中,来启用此Bundle。

<?php

 public function registerBundles()
    {
        $bundles = array(
            new Thedarsideofit\AfipBundle\AfipBundle(),
        );

步骤3:添加配置文件

在项目中的app/config/config.yml文件中

afip:
    parameters:
        CUIT: 20111111112
        production: false
        res_folder: 'Resources/afip/'
        ta_folder: 'Resources/afip/'
        cert: 'cert'
        key: 'key'
        passphrase: ''

步骤4:创建res文件夹

添加证书和密钥文件

示例:在Controller中使用Afip

<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;


class DefaultController extends Controller {
{
    /**
     * @Route("/app", name="app")
     */
    public function index()
    {
        die($this->get('afipservice')->getWS()->RegisterScopeTen->GetServerStatus());
    }
}

依赖项

作者

Gonzalo Alonso - gonkpo@gmail.com

Symfony 2的适配器

Diego Ramirez dramirez@hydras.com.ar