Download the PHP package laulamanapps/document-signer-laravel without Composer
On this page you can find all versions of the php package laulamanapps/document-signer-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laulamanapps/document-signer-laravel
More information about laulamanapps/document-signer-laravel
Files in laulamanapps/document-signer-laravel
Package document-signer-laravel
Short Description Laravel integration for the document signer SDK: config, service provider, manager, facade, and webhook routes for ValidSign and DocuSign.
License proprietary
Informations about the package document-signer-laravel
Laravel integration for the document signer SDK
Laravel integration for the Document Signer SDK: config, service provider, driver manager, facade, and verified webhook routes for both ValidSign and DocuSign.
Install
Then add at least one provider package — the laravel package treats both as optional:
Publish the config:
Configure
config/document-signer.php reads from .env. Minimum for ValidSign:
Minimum for DocuSign:
Default driver
DOCUMENT_SIGNER_DRIVER is optional. If left unset the manager auto-selects
the sole configured driver — i.e. the one whose primary credential
(VALIDSIGN_API_KEY or DOCUSIGN_INTEGRATION_KEY) is present. Set the
variable explicitly only when you configure both providers in the same app:
Without an explicit choice in the "both configured" case, the first implicit
DocumentSigner::send() call throws with the list of configured drivers.
Sending an envelope
You can also type-hint the manager directly:
Blade components
The raw {[type:signer:name]} syntax is safe to type inside .blade.php
files — {[ / ]} doesn't collide with Blade's {{ }} echo tags. For
ergonomics, though, the package ships five anonymous components that compile
to the raw placeholder token so contracts read like normal HTML:
| Component | Compiles to |
|---|---|
<x-document-signer::signature signer="…" name="…" /> |
{[signature:…:…]} |
<x-document-signer::initials signer="…" name="…" /> |
{[initials:…:…]} |
<x-document-signer::text signer="…" name="…" /> |
{[text:…:…]} |
<x-document-signer::date signer="…" name="…" /> |
{[date:…:…]} |
<x-document-signer::checkbox signer="…" name="…" /> |
{[checkbox:…:…]} |
The components are registered under the document-signer:: namespace by the
service provider. Both signer and name are required attributes. After the
view renders, the resulting HTML is what you pass to Document::$html — the
SDK parser sees the literal {[type:signer:name]} tokens and proceeds as
usual.
PDF renderer
The manager wires a PdfRenderer
into every driver it resolves. By default it uses the SDK's
BrowsershotPdfRenderer. Two other options are built in.
Default: install spatie/browsershot
The SDK bundles the BrowsershotPdfRenderer class but not the Composer
dependency — you need to install it explicitly if you want to keep the
default:
Without it the manager throws an InvalidArgumentException pointing at the
install command the first time it tries to build the renderer.
Use spatie/laravel-pdf
If your application already configures spatie/laravel-pdf — custom Node binary, default paper size, headers/footers, Browsershot tweaks — switch the SDK over so it picks up that configuration:
The SDK then renders every envelope document through the Pdf facade. If
laravel-pdf isn't installed when this option is selected, the manager
throws an InvalidArgumentException pointing at the install command.
Bind a fully custom renderer
For any other engine (wkhtmltopdf, Gotenberg, an external service, a tuned
Browsershot setup), implement the SDK's PdfRenderer interface and bind it
in a service provider — the manager picks up the container binding first and
ignores the config value:
See Writing a custom renderer for the interface and an example.
Webhooks
The signing secret is the on/off switch. A webhook route is registered for each driver whose secret is set:
DOCUSIGN_CONNECT_HMAC_SECRETset →POST /document-signer/webhooks/docusignVALIDSIGN_CALLBACK_SECRETset →POST /document-signer/webhooks/validsign
If neither is set, no webhook routes are registered at all — a webhook with no secret would 401 every request anyway, so exposing it wouldn't be useful. This is also the switch to use when callbacks are handled by a separate service (queue worker, edge function, external ingest): just leave the secret unset.
DocuSign only:
ValidSign only:
The common prefix (default document-signer/webhooks) and middleware
(default ['api']) live under document-signer.webhooks in the config file.
| Provider | Registered when | Route name | URL | Signature mechanism |
|---|---|---|---|---|
| DocuSign | DOCUSIGN_CONNECT_HMAC_SECRET is set |
document-signer.webhooks.docusign |
POST /document-signer/webhooks/docusign |
HMAC-SHA256 of raw body in X-DocuSign-Signature-1..N |
| ValidSign | VALIDSIGN_CALLBACK_SECRET is set |
document-signer.webhooks.validsign |
POST /document-signer/webhooks/validsign |
Shared secret in Authorization: Basic <credentials> — accepted as base64("user:secret"), base64(secret), or the raw string |
Both verifiers use hash_equals for constant-time comparison and reject
unverified requests with HTTP 401.
Listen to the event in app/Providers/EventServiceProvider.php:
The controller resolves the payload's event token against the provider's
WebhookEvent enum before dispatching, so listeners can classify events
without doing the enum look-up themselves:
The raw payload is still available on $event->payload (and the original
Illuminate\Http\Request on $event->request) if you need vendor-specific
fields.
Translated event labels
Each WebhookEvent can be rendered as a human-readable string via
EventTranslator, backed by the package's translation files:
The package ships English (en) and Dutch (nl) translations for every
ValidSign event out of the box. To add a locale or override the wording,
publish the translations and edit the copies:
Translation keys mirror the enum's raw provider tokens verbatim
(document-signer::validsign-events.PACKAGE_COMPLETE), so you can also
reach them via trans() directly.
Testing
Swap the live provider for a fake in tests:
For full end-to-end provider mocking, see Extending the SDK.
Requirements
- PHP 8.5
- Laravel 13
laulamanapps/documentsigner-sdklaulamanapps/documentsigner-validsignorlaulamanapps/documentsigner-docusign(each is optional; installed only for the drivers you actually use — the manager throws a clearcomposer requirehint if a missing driver is requested)- Node.js + Puppeteer (for the default Browsershot renderer)
Documentation
All versions of document-signer-laravel with dependencies
laulamanapps/document-signer-sdk Version ^1.0
illuminate/contracts Version ^13.0
illuminate/support Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0