la-souris/document-signer-docusign
DocuSign driver for la-souris/document-signer that lets Laravel and PHP apps send documents for eSignature, track envelope signing status, and retrieve completed, signed files through one consistent, framework-agnostic signing API.
Architecture fit
DocuSignProvider satisfies the existing la-souris/document-signer-sdk SignatureProvider contract. From an architecture standpoint this is a plug-in swap behind an interface the application already depends on, so domain code (envelope orchestration, document records, webhook handlers) should remain untouched.sdkDocumentMap envelope custom field, which persists application Document::$id values inside DocuSign. That is a pragmatic solution to DocuSign's positional document ids and is durable across callbacks, but it makes DocuSign the system of record for a mapping the application also owns. Treat it as a cache, not a source of truth.Integration feasibility
anchorYOffset per tab plus the document-wide anchorYOffsetPixels fine-tune is a genuine de-risking feature: calibration becomes a config change rather than a code deploy.Technical risk
DocuSignJwtAuth and should be explicitly verified under load and after key rotation.Summary.pdf skip is correct, but the fallback should be logged and alerted on, not silent.EventType mapping for Connect callbacks but say nothing about HMAC signature verification, replay protection, or duplicate/out-of-order handling. Unverified webhooks are an unauthenticated state-transition endpoint and would be a release blocker for me.SignedDocumentUnavailableException being explicitly retryable is good contract hygiene, but it means download is inherently asynchronous; callers must have a retry policy with backoff or the exception becomes a user-facing error.Key questions
anchorYOffsetPixels value per document template, and where is that value recorded so it is reviewable and reproducible outside a running environment?downloadAuditEventsJson() exposed to operators only, or does it form part of any contractual audit deliverable?Stack fit
DocuSignConfig) rather than env-var spelunking, so it fits standard Laravel service-provider binding and config caching. It slots into the existing SignatureProvider binding with no change to calling code.Document records with ids and already handles the SDK's exception taxonomy. Both are pre-existing conditions of adopting document-signer-sdk, so no new domain modelling is required.Migration path
sdkDocumentMap is written at send time, so mapping is populated only for envelopes sent after cutover.Compatibility
document-signer-sdk satisfies ^1.0, and check whether any other provider package pins a conflicting SDK range.downloadAudit().Sequencing
anchorYOffsetPixels per document template and persist the value in config/repo, not in a live environment.EventType mapping against real payloads for sent/delivered/completed/declined/voided.SignedDocumentUnavailableException; verify downloadAudit() returns a valid PDF and that Summary.pdf is excluded from the signed-document set.Maintenance
anchorYOffsetPixels knob is operationally excellent (drift correction without a deploy) but creates configuration drift risk if values are edited per environment. Require these values to live in version-controlled config with a comment naming the document template they calibrate.Support
downloadAuditEventsJson() is the right escape hatch for investigations; make sure support staff know the Certificate of Completion PDF and the raw JSON feed are different artefacts and answer different questions.Scaling
Failure modes
anchorYOffsetPixels configuration change, no deploy; document the correction so it is not re-litigated.Document record. Alert on any fallback-path resolution.SignedDocumentUnavailableException treated as terminal — customer-facing "download failed" on an envelope that is simply not finalized. Enforce retry-with-backoff in the caller.Summary.pdf naming collision — a legitimately signed document named Summary.pdf would be skipped; confirm the skip rule is anchored on DocuSign's certificate artefact, not on filename alone.Ramp-up
How can I help you explore Laravel packages today?