firling / invoicereader
此包最新版本(1.0.4)没有可用的许可证信息。
返回发送的发票(图像)的名称、总计、增值税和日期
1.0.4
2020-02-13 10:35 UTC
Requires
- php: >=7.1.0
This package is not auto-updated.
Last update: 2024-09-21 13:44:24 UTC
README
composer require firling/invoicereader
https://packagist.org.cn/packages/firling/invoicereader
此包使用微软认知服务API,您需要提供一个API密钥以及基本URL。
函数:readInvoice($apiKey, $baseUrl, $imageB64)
因素
- $apiKey: 微软认知服务API的密钥
- $baseUrl: 微软认知服务API的基本URL
- $imageB64: 以base64散列的图像。
返回值
此函数返回一个包含不同值的数组/字典
- lines: 微软API返回的每行的数组
- name: 发票名称(有点随机)
- date: 发票日期
- total: 发票的总价
- VAT: 发票的增值税(如果没有增值税,则返回它认为的增值税)