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.
Download antonioprimera/contractera-laravel-client
More information about antonioprimera/contractera-laravel-client
Files in antonioprimera/contractera-laravel-client
Package contractera-laravel-client
Short Description Laravel client package for backend-only Contractera integrations.
License MIT
Homepage https://github.com/AntonioPrimera/contractera-laravel-client
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:
Application token- stored in the host backend and used for cross-account operations such as provisioning, updating, deleting and regenerating account tokens.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:
- 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-previewconverts frontendvaluesto Contracterareplacements;- generated document URLs returned to the browser are local host URLs;
- 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
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