ytec/rest-pdf-invoice

Magento 2的REST PDF发票

1.0.0 2024-01-19 20:59 UTC

This package is auto-updated.

Last update: 2024-09-19 22:39:27 UTC


README

Ytec Rest Pdf Invoice for Magento 2

Ytec Rest Pdf Invoice for Magento 2

Packagist Version Packagist Downloads Supported Magento Versions License

简介

介绍Ytec Rest Pdf Invoice for Magento 2:一个简化的模块,通过REST API端点检索PDF发票,正好符合其描述。😎

功能

  • GET /rest/V1/orders/:orderId/pdf-invoice 端点:检索特定订单的PDF发票。
  • 修改后的GET /rest/V1/invoices/:invoiceId 端点:现在在请求时带有'Accept: application/pdf'头时渲染PDF发票。

先决条件

  • PHP 7.4或更高版本
  • Magento 2.4.x

安装

  1. 在您的Magento根目录中运行composer require ytec/rest-pdf-invoice
  2. 执行bin/magento setup:upgrade
  3. 通过运行bin/magento cache:cleanbin/magento cache:flush清除缓存。

如何使用

检索订单的PDF发票

/rest/V1/orders/:orderId/pdf-invoice发送GET请求,并带有适当的授权。用实际的订单ID替换:orderId

检索发票的PDF发票

/rest/V1/invoices/:invoiceId发送带有头Accept: application/pdf和适当授权的GET请求。用实际的发票ID替换:invoiceId

依赖关系

此模块依赖于以下Magento 2模块

  • Magento_Sales
  • Magento_Framework

许可

此模块是开源的,但所有荣誉归Ytec,Matheus da Costa Marqui的公司。有关完整的许可,请参阅LICENSE.md文件。

支持和贡献

对于错误、问题或功能请求,请在此存储库中打开问题,或发送电子邮件到matheus.701@live.com以获得更个性化的帮助。

版权(c)2023 Ytec,Matheus da Costa Marqui的公司(matheus.701@live.com