Download the PHP package antonioprimera/contractera-laravel-client without Composer

On this page you can find all versions of the php package antonioprimera/contractera-laravel-client. 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 contractera-laravel-client

Contractera Laravel Client

Laravel client package for backend-only Contractera integrations.

The package is meant to be used together with the Vue SDK:

The frontend package renders the UI. This Composer package handles the server-to-server Contractera API calls from a Laravel host application such as AgroCity or ProjectCity.

Browser code must never receive Contractera tokens.

Installation

Publish the config:

Add environment values:

Local development usually uses:

Security model

Contractera uses two token types:

  1. Application token - stored in the host backend and used for cross-account operations such as provisioning, updating, deleting and regenerating account tokens.
  2. Account token - issued by Contractera for one Contractera account and used for template/document operations.

The host application must store account tokens encrypted and must proxy all frontend requests through its own backend.

Provision an account

Recommended host model casts:

Application-scoped operations

deleteAccount() marks the account for deletion in Contractera and immediately revokes account-scoped tokens.

Account-scoped operations

Create an account-scoped client from the encrypted token stored in the host application:

List templates

Upload template

For a placeholder like __OWNER_NAME__, use pattern __#__. Contractera exposes key OWNER_NAME.

Placeholder metadata

Supported input_type values:

Validate and preview

The host frontend should allow generation only after Contractera returns a valid preview response.

Generate document

Status and download

The host application should expose local download URLs to the browser, not direct Contractera URLs.

Frontend integration

The Vue SDK receives an adapter implemented by the host frontend. That adapter calls local backend routes, and those local backend routes use this Composer package.

Recommended local routes:

Host application testing

After installing this package in a Laravel host application, test both layers:

  1. backend proxy tests with Http::fake():
    • provisioning calls use the Application token;
    • template/document calls use the account token;
    • browser responses never contain Contractera tokens;
    • validate-preview converts frontend values to Contractera replacements;
    • generated document URLs returned to the browser are local host URLs;
  2. frontend/browser checks with @raprim/contractera-plugin-vue3:
    • placeholder metadata loads and saves;
    • live preview updates after debounced form edits;
    • invalid input blocks generation;
    • generated documents download through the host backend;
    • mobile mode uses mobile-mode="tab" or another explicit mobile strategy.

The reference integration app is:

Its Contractera integration tests are in:

Testing

Compatibility

Use this package with @raprim/contractera-plugin-vue3 using the same major version once both packages are versioned.

License

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


All versions of contractera-laravel-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/http Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
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 antonioprimera/contractera-laravel-client contains the following files

Loading the files please wait ...