承接 indigit/invoicexpress 相关项目开发

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

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

indigit/invoicexpress

最新稳定版本:1.1.1

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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固