Download the PHP package jeffersongoncalves/laravel-zapsign without Composer

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

![Laravel ZapSign](https://raw.githubusercontent.com/jeffersongoncalves/laravel-zapsign/main/art/jeffersongoncalves-laravel-zapsign.png)

Laravel ZapSign

Buy Me A Coffee

Latest Version on Packagist Tests Total Downloads

Laravel client for the ZapSign e-signature REST API: documents, templates, signers and webhooks — rate-limit aware out of the box, with database persistence and queued jobs.

ZapSign allows 500 requests per minute per token/IP and answers 429 above that. This package:

Documents and signers can be stored in your database and kept up to date by queued jobs and webhooks, and signed PDFs copied to any filesystem disk before ZapSign's 60-minute links expire.

Installation

Publish the config and migrations, then migrate (creates zapsign_documents, zapsign_signers and zapsign_webhook_calls):

Add your API token (ZapSign > Settings > Integration > ZapSign API):

Usage

Every method returns the decoded JSON response as an array. Request bodies follow the ZapSign docs field names as-is.

Errors

Database and jobs

Models

Model Table Holds
Models\Document zapsign_documents token, external_id, name, status (pending/signed/refused), sandbox, original_file, signed_file, signed_file_path, rejected_reason, finished_at, raw payload, optional documentable (any model) — soft deletes
Models\Signer zapsign_signers token, external_id, name, email, phone, status, sign_url, times_viewed, last_view_at, signed_at, raw payload
Models\WebhookCall zapsign_webhook_calls every received webhook (body hash unique), event_type, document_token, processed_at, exception

Document::sync(array $data, ?Model $documentable = null) upserts any document array returned by the API or a webhook (same shape) with its signers — signers missing from the payload are removed — so you can store results of your own calls too.

Jobs

Rate limit in your own jobs

The client already waits for a free slot. In your own jobs, keep max_wait small and release the job instead of blocking the worker:

Option (config/zapsign.php) Env Default
rate_limit.enabled ZAPSIGN_RATE_LIMIT_ENABLED true
rate_limit.max_attempts ZAPSIGN_RATE_LIMIT_MAX_ATTEMPTS 500
rate_limit.decay_seconds ZAPSIGN_RATE_LIMIT_DECAY_SECONDS 60
rate_limit.max_wait ZAPSIGN_RATE_LIMIT_MAX_WAIT 60
rate_limit.cache_store ZAPSIGN_RATE_LIMIT_CACHE_STORE default store
rate_limit.retry_times ZAPSIGN_RETRY_TIMES 3
rate_limit.retry_sleep_ms ZAPSIGN_RETRY_SLEEP_MS 1000 (doubles each retry)

Use a shared store (Redis, database) when you run several servers/workers — the array or file store only limits a single process/host.

Webhooks

ZapSign does not sign webhook requests, so the endpoint is protected by a secret header that you register together with the webhook:

Register https://your-app.com/zapsign/webhook in ZapSign (Settings > Integration > Webhooks) with a custom header X-ZapSign-Secret: a-long-random-string, or via the API:

The POST /zapsign/webhook route (name zapsign.webhook) is registered only when a secret is set. It:

  1. checks the secret header (403 otherwise);
  2. stores the call in zapsign_webhook_calls — once per body (ZapSign sends no event id and redelivers until it gets a 200), so duplicate deliveries are ignored;
  3. answers 200 right away and queues ProcessWebhookCall, which upserts the document and its signers from the body, soft-deletes on doc_deleted, queues StoreSignedFile when the document is signed and a disk is configured, and finally dispatches WebhookReceived.

The route has no web middleware, so CSRF does not apply. Schedule php artisan model:prune to remove stored calls older than ZAPSIGN_WEBHOOK_PRUNE_AFTER_DAYS (30).

The listener runs after the local tables are updated. $event->payload holds the full body.

Testing

Changelog

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

License

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


All versions of laravel-zapsign with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3|^8.4
laravel/framework Version ^12.61.1|^13.12.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 jeffersongoncalves/laravel-zapsign contains the following files

Loading the files please wait ...