承接 akamstar/freemecef 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

akamstar/freemecef

最新稳定版本:1.1.2

Composer 安装命令:

composer require akamstar/freemecef

包简介

Simple PHP emecef integration

README 文档

README

[EN] Freemecef makes it possible to issue standardized invoices with the emecef API of the DGI with PHP

[FR] Freemecef permet d'émettre de factures normalisées avec l'API emecef de la DGI avec PHP

Usage

//set a valide jwt token
$token = "eyJhbGciOiJ...";

Invoice API

// Create new MecefInfo object
// second parameter: false = test env, true = prod env, default: false 
$mecefinfo =new \Freemecef\EmecefInfo($token);

//get info
$info = $mecefinfo->getInfo();

//print result
print_r($info->json();


// you can also use
->getTaxGroups() to get tax groups
->getInvoiceTypes() to get invoice types
->getPaymentTypes() to get payment types

Info API

emecef = (new \Freemecef\Emecef($token))->setClient("Papa na Venza")->setInvoiceType(InvoiceTypes::VENTE)
    ->setOperator("Tonton")
    ->addPaymentType(PaymentTypes::ESPECES, 100) // you can add multiple payment types
    ->addProduct('Article 2',50, 1); // you can add multiple products

$invoice = $emecef->invoice()->json();

$data = $emecef->execute($invoice['uid'])->json())->json();

For more

For more, read Emecef documentation at DGI website

Contact me

On twitter @tontonakam

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-27