Download the PHP package andreilungeanu/smartbill without Composer

On this page you can find all versions of the php package andreilungeanu/smartbill. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smartbill

Smartbill Laravel Package

Latest Version on Packagist Total Downloads

A Laravel package for the Smartbill API, offering full compatibility with Laravel versions 11 and 12.

Installation

You can install the package via composer:

Configuration

You can publish the configuration file with:

This will create a config/smartbill.php file in your application's config directory. You should add your Smartbill API credentials to your .env file:

Usage Examples

You can interact with the API in three ways:

1. Using the Facade (recommended for Laravel)

2. Using the Service Container

3. Direct Instantiation

All three methods are valid and provide the same functionality. The Facade is the most convenient for typical Laravel usage, while the other two are useful for testing, dependency injection, or use outside Laravel.

Example 1: Creating an Invoice

This example shows how to create a new invoice and retrieve its number.

Example API Response

A successful create call will return an array decoded from the following JSON structure:


Example 2: Downloading an Invoice PDF

This example shows how to download the PDF content of an existing invoice.


And many more...

This is just a small sample of the available methods. For a complete list of all available endpoints and their parameters, please see the full documentation.

Known Issues

When working with the Smartbill API, there are a few known issues to be aware of:

  1. Non-Compliant Headers on 400 Errors: A significant issue exists where the Smartbill API returns non-compliant HTTP headers, particularly when a 400 Bad Request status is returned. This has been most commonly observed on endpoints like /invoice/pdf and /estimates/pdf when a document is not found. The API returns headers with spaces in their names (e.g., "Entitate atasata"), which violates the HTTP/1.1 specification (RFC 7230, section 3.2).

    This non-compliance causes standard HTTP clients like Guzzle (used by Laravel) to throw an InvalidArgumentException, as they enforce strict adherence to HTTP standards. To manage this, the package includes a temporary workaround that uses a raw cURL request to bypass Guzzle's validation. While this allows the application to handle the error, please be aware that this behavior may occur in other situations as well.

  2. Internal Server Errors on Invalid Request Data: The API may return a 500 Internal Server Error when the request payload contains invalid data, such as a typo in a required field name.

    For example, sending nume instead of name in the client object will trigger a 500 error:

    Ideally, the API should respond with a 400 Bad Request status and a helpful error message detailing which field is incorrect. Instead, it returns a generic 500 error, which makes debugging difficult as it incorrectly suggests a server-side failure rather than a client-side mistake.

While this package attempts to mitigate these issues where possible, the fundamental problems lie with the API's implementation. We are awaiting fixes from the Smartbill provider to ensure more reliable and standards-compliant behavior.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of smartbill with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/http Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
spatie/laravel-package-tools Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andreilungeanu/smartbill contains the following files

Loading the files please wait ....