Lue dans les fichiers PHP du paquet au commit 497cf974387b : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
ApiclassDocuSign's eSignature REST API v2.1, authenticated by the JWT grant: a JWT signed (RS256) with the integration's private key, for the user it acts as, exchanged at the account server for an access token - kept until a minute before it lapses. The account's base URI is the userinfo's when none is configured.
6 methods · 1 property · 3 constants
DocusignGatewayFactoryclassDocuSign eSignature: envelopes, by e-mail or signed in the application's page, the JWT grant for an integration acting as one of the account's users.
17 options · 1 method
AbstractActionclassAn action on DocuSign's eSignature REST API v2.1.
1 method
CancelActionclassPUT /envelopes/{id}, status "voided" with its reason (required by DocuSign).
2 methods
CreateActionclassPOST /envelopes, status "created": the documents in base64 (documentId 1, 2...), the signers (recipientId 1, 2..., routingOrder their turn, clientUserId their key when they sign in the page) and their tabs.
2 methods
DownloadActionclassGET /envelopes/{id}/documents/combined (certificate=false) and /documents/certificate: the certificate of completion.
2 methods
FetchActionclassGET /envelopes/{id}?include=recipients.
2 methods
NotifyActionclassA Connect message (JSON): X-DocuSign-Signature-n checked, its event read.
2 methods
RemindActionclassPUT /envelopes/{id}/recipients?resend_envelope=true, with the signers who have not signed.
2 methods
SendActionclassPUT /envelopes/{id}, status "sent".
2 methods
SigningUrlActionclassPOST /envelopes/{id}/views/recipient: a signing session for an embedded signer (the clientUserId the envelope was created with). Use it at once.
2 methods
Omnisign\Docusign
Api class
final class Api Api.php:19
DocuSign's eSignature REST API v2.1, authenticated by the JWT grant: a JWT signed (RS256) with the integration's private key, for the user it acts as, exchanged at the account server for an access token - kept until a minute before it lapses. The account's base URI is the userinfo's when none is configured.
const PROVIDER = 'docusign'const DEMO_OAUTH = 'account-d.docusign.com'const OAUTH = 'account.docusign.com'public readonly string $accountId
Api::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $integrationKey, readonly string $userId, readonly string $privateKey, public readonly string $accountId, ?string $baseUri = null, readonly string $oauthHost = self::DEMO_OAUTH, readonly array $hmacKeys = [], readonly ?\Closure $clock = null)Api::json()
public function json(string $method, string $path, array $json = [], array $query = []): arrayApi::file()
public function file(string $path, array $query = []): AnswerApi::envelopes()
public function envelopes(): stringApi::verify()
public function verify(string $body, array $signatures): arrayA Connect message, its HMAC checked: X-DocuSign-Signature-1, -2... each the base64 HMAC-SHA-256 of the raw body under one of the account's Connect keys.
Api::assertion()
public function assertion(int $now): stringThe JWT grant's assertion: RS256, for the user the integration acts as.
DocusignGatewayFactory class
final class DocusignGatewayFactory extends GatewayFactory DocusignGatewayFactory.php:34
DocuSign eSignature: envelopes, by e-mail or signed in the application's page, the JWT grant for an integration acting as one of the account's users.
options: integration_key: '%env(DOCUSIGN_INTEGRATION_KEY)%' # required: the app's client id user_id: '%env(DOCUSIGN_USER_ID)%' # required: the user it acts as (who consented once) private_key: '%env(DOCUSIGN_PRIVATE_KEY)%' # required: the RSA key's PEM, or its path account_id: '%env(DOCUSIGN_ACCOUNT_ID)%' # required: the API account id (GUID) sandbox: true # account-d.docusign.com and demo.docusign.net; false: production base_uri: ~ # https://demo.docusign.net/restapi; production: the userinfo's when left empty hmac_keys: '%env(default::DOCUSIGN_HMAC_KEYS)%' # Connect's HMAC keys, comma-separated: notify() checks X-DocuSign-Signature-n
Options
| Option | Default | |
|---|---|---|
sandbox | true | |
base_uri | null | |
hmac_keys | [] | |
omnisign.capabilities | new Capabilities([Level::SIMPLE], embedded: true, ordered: true, identityCheck: false, thirdParty: true) | |
omnisign.api | function (Config $c): Api {
$sandbox = $c->bool('sandbox');
return new Api($this->http ?? HttpClient::create(), (string) $c['integration_key'], (stri… | |
omnisign.action.create | new CreateAction() | |
omnisign.action.send | new SendAction() | |
omnisign.action.fetch | new FetchAction() | |
omnisign.action.remind | new RemindAction() | |
omnisign.action.cancel | new CancelAction() | |
omnisign.action.download | new DownloadAction() | |
omnisign.action.signing_url | new SigningUrlAction() | |
omnisign.action.notify | static fn(Config $c) => $c->list('hmac_keys') ? new NotifyAction() : null | |
integration_key | required | |
user_id | required | |
private_key | required | |
account_id | required |
DocusignGatewayFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)Omnisign\Docusign\Action
AbstractAction class
abstract class AbstractAction implements ActionInterface, ApiAwareInterface AbstractAction.php:15
An action on DocuSign's eSignature REST API v2.1.
AbstractAction::__construct()
public function __construct()CancelAction class
final class CancelAction extends AbstractAction CancelAction.php:10
PUT /envelopes/{id}, status "voided" with its reason (required by DocuSign).
CancelAction::supports()
public function supports(Request $request): boolCancelAction::execute()
public function execute(Request $request): voidCreateAction class
final class CreateAction extends AbstractAction CreateAction.php:18
POST /envelopes, status "created": the documents in base64 (documentId 1, 2...), the signers (recipientId 1, 2..., routingOrder their turn, clientUserId their key when they sign in the page) and their tabs.
CreateAction::supports()
public function supports(Request $request): boolCreateAction::execute()
public function execute(Request $request): voidDownloadAction class
final class DownloadAction extends AbstractAction DownloadAction.php:11
GET /envelopes/{id}/documents/combined (certificate=false) and /documents/certificate: the certificate of completion.
DownloadAction::supports()
public function supports(Request $request): boolDownloadAction::execute()
public function execute(Request $request): voidFetchAction class
final class FetchAction extends AbstractAction FetchAction.php:9
GET /envelopes/{id}?include=recipients.
FetchAction::supports()
public function supports(Request $request): boolFetchAction::execute()
public function execute(Request $request): voidNotifyAction class
final class NotifyAction extends AbstractAction NotifyAction.php:11
A Connect message (JSON): X-DocuSign-Signature-n checked, its event read.
NotifyAction::supports()
public function supports(Request $request): boolNotifyAction::execute()
public function execute(Request $request): voidRemindAction class
final class RemindAction extends AbstractAction RemindAction.php:10
PUT /envelopes/{id}/recipients?resend_envelope=true, with the signers who have not signed.
RemindAction::supports()
public function supports(Request $request): boolRemindAction::execute()
public function execute(Request $request): voidSendAction class
final class SendAction extends AbstractAction SendAction.php:9
PUT /envelopes/{id}, status "sent".
SendAction::supports()
public function supports(Request $request): boolSendAction::execute()
public function execute(Request $request): voidSigningUrlAction class
final class SigningUrlAction extends AbstractAction SigningUrlAction.php:14
POST /envelopes/{id}/views/recipient: a signing session for an embedded signer (the clientUserId the envelope was created with). Use it at once.
SigningUrlAction::supports()
public function supports(Request $request): boolSigningUrlAction::execute()
public function execute(Request $request): void