laulamanapps/document-signer-sdk
Composer 安装命令:
composer require laulamanapps/document-signer-sdk
包简介
Provider-agnostic e-signature SDK for PHP: build envelopes from HTML templates with {[type:signer:name]} placeholders, render them to PDF, and send them through any SignatureProvider implementation (ValidSign, DocuSign, or your own).
README 文档
README
A provider-agnostic PHP SDK for sending HTML documents through e-signature providers.
You author contracts as HTML with {[type:signer:name]} placeholders; the SDK
translates them to the provider's native anchor format, renders the HTML to PDF,
and creates the envelope.
+-------------------+ +--------------------+ +----------------------+
| HTML + signers | --> | documentsigner | --> | ValidSign / |
| (your code) | | sdk + provider | | DocuSign API |
+-------------------+ +--------------------+ +----------------------+
Packages
| Package | Path | Purpose |
|---|---|---|
laulamanapps/document-signer-sdk |
sdk/ |
Domain model, placeholder parser, anchor-replacer base, Browsershot PDF renderer, SignatureProvider contract. |
laulamanapps/document-signer-validsign |
validsign/ |
ValidSign (OneSpan Sign) implementation. |
laulamanapps/document-signer-docusign |
docusign/ |
DocuSign eSignature implementation. |
All three are installed together for local development through the root
composer.json, which exposes them as path repositories.
End-to-end example
use LauLamanApps\DocumentSigner\Sdk\Document\Document; use LauLamanApps\DocumentSigner\Sdk\Envelope\Envelope; use LauLamanApps\DocumentSigner\Sdk\Signer\Signer; use LauLamanApps\DocumentSigner\Sdk\Signer\SigningOrder; use LauLamanApps\DocumentSigner\ValidSign\ValidSignConfig; use LauLamanApps\DocumentSigner\ValidSign\ValidSignProvider; $envelope = new Envelope( name: 'NDA 2026-06', documents: [ new Document( id: 'nda', name: 'Non-disclosure agreement', html: '<h1>NDA</h1><p>Signed by {[text:counterparty:fullname]}</p>' . '<p>{[signature:counterparty:sig]} on {[date:counterparty:signdate]}</p>', ), ], signers: [ new Signer(key: 'counterparty', name: 'Jane Doe', email: 'jane@example.com'), ], emailSubject: 'Please sign the NDA', emailMessage: 'Hi Jane, please sign at your convenience.', signingOrder: SigningOrder::Parallel, ); $provider = new ValidSignProvider( new ValidSignConfig(apiKey: getenv('VALIDSIGN_API_KEY')), ); $receipt = $provider->send($envelope); // $receipt->providerEnvelopeId is now the ValidSign package id.
Swapping providers is a one-line change: instantiate DocuSignProvider with a
DocuSignConfig instead — the Envelope is untouched.
Documentation
Start with Getting started, then dive into the relevant guide:
- Getting started
- Architecture
- Placeholder syntax
- PDF rendering
- ValidSign provider
- DocuSign provider
- Extending the SDK
- Writing a custom provider
Requirements
- PHP 8.5
- Node.js + Puppeteer (required by
spatie/browsershotfor HTML→PDF) - A ValidSign or DocuSign account with API credentials
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-06-30