indigit/invoicexpress 问题修复 & 功能扩展

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

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

indigit/invoicexpress

Composer 安装命令:

composer require indigit/invoicexpress

包简介

A simple PHP wrapper for InvoiceXpress API

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

This package offers a simple way to create invoices using InvoiceXpress API. InvoiceXpress is a billing/invoicing plataforms available in Portugal and some other countries. After some time looking for a package we didn+t found any that fit our needs so here we are! Please keep in mind some of the endpoints are still to be implement please feel free to push a PR. We don't have any plans right now on finishing them since we don't need it for our own use case. This plugin comes with some Laravel dependencies and tools but it should work out of the box on any non-laravel project

Endpoints Working

  • Invoices: Send By Email
  • Invoices: Send PDF
  • Invoices: Get / Create / Update / Change State
  • Invoices: List All
  • Invoices: Related Documents
  • Invoices: Create / Cancel Payment Receipts
  • Estimates: Not implemented yet
  • Guides: Not implemented yet
  • Purchase Orders: Not implemented yet
  • Clients: List All
  • Clients: Get / Create / Update / Invoices
  • Clients: Find By Code / Find by Name
  • Items: Get / Create / Update / Delete / List
  • Sequences: Not implemented yet
  • Taxes: Get / Create / Update / Delete / List
  • Accounts: Get / Create / Update / Create Existing

Installation

Install the package via composer: composer require indigit/invoicexpress For DEV Build : composer require indigit/invoicexpress --dev

Example of Auth Usage

Each request requires Authentication via Query Parameter, we have done it in a easy way. You should create an InvoiceXpress\Auth by passing your API Key and Account username that can be found at : Account -> Integrations -> API

<?php
use InvoiceXpress\Auth;
use InvoiceXpress\Api\Invoice;
use InvoiceXpress\Exceptions\Generic;
use InvoiceXpress\Exceptions\InvalidResponse;

$auth = new Auth('YOUR_ACCOUNT_NAME', 'YOUR_API_KEY');

try {
    # Create the base invoice Item
    $invoice = Invoice::get($auth, 123456, \InvoiceXpress\Entities\Invoice::DOCUMENT_TYPE_INVOICE);
} catch (\Exception $e) {
    if ($e instanceof InvalidResponse) {
        dd($e->getBody(), $e->getBodyAsJson());
    } elseif ($e instanceof Generic) {
        dd($e->getMessage(), $e->getContext());
    } else {
        dd($e->getMessage());
    }
    dd($e);
}

Usage Examples

For more examples and see how it works please check the "Examples" Folder.

Recommendations

1.: It is strongly recommended to use a .env file to pass your credentials and API keys into the auth object. Never save it with clear text within the project.

2.: It is strongly recommended to create some sort of database logic to keep track of invoices_types and PKs, since InvoiceXpress API has a lot of document types. This could have been easly doen with only one implementation of "Documents" into a single endpoint

Collaborators

License

InvoiceXpress is an open-sourced PHP package licensed under the MIT license and cannot be sold or licensed by any means.

indigit/invoicexpress 适用场景与选型建议

indigit/invoicexpress 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.62k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 05 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「invoice」 「invoicexpress」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 indigit/invoicexpress 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 indigit/invoicexpress 我们能提供哪些服务?
定制开发 / 二次开发

基于 indigit/invoicexpress 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-28