pixan/cfdi 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pixan/cfdi

Composer 安装命令:

composer require pixan/cfdi

包简介

CFDi Module for Pixan APPS

README 文档

README

CFDI is a package that provides electronic invoicing capabilities through different PAC providers in Mexico for Laravel applications.

Installation

To install this package using composer:

composer require pixan/cfdi

Configuration

Add the service provider to the providers array in app.php:

Pixan\Cfdi\CfdiServiceProvider::class,

Publish the configuration file, make sure you select Pixan\Cfdi\CfdiServiceProvider from the provided menu:

php artisan vendor:publish

Set the configuration parameters in the newly created configuration file:

config/cfdi.php

Usage

Generate an XML seal

To generate the seal of a previously formed XML file, create an array containing a valid CFDi certificate and its key file in PEM format. Calling the seal method on the cfdi instance will return a valid seal string for the provided XML document:

$config = [
    'certificate' => $certificateFileContents,
    'pem' => $pemFileContents
];
$cfdi = new Cfdi($config);
$seal = $cfdi->seal($xml);

Stamp an XML

Calling the stamp method on the cfdi instance will return a valid xml that has been stamped by the requested PAC service and configured environment. *Make sure that the proper configuration was provided when constructing the cfdi instance.

$config = [
    'certificate' => $certificateFileContents,
    'pem' => $pemFileContents
];
$cfdi = new Cfdi($config);
$seal = $cfdi->stamp($xml);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: XSLT

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固