docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
198 stars 122 forks source link

Can't create envelope since update from 6.5.1 to 6.6.0 #163

Closed Wimble84 closed 2 years ago

Wimble84 commented 2 years ago

Hi

Since I updated from 6.5.1 to 6.6.0. I get an invalid request body error response when trying to create an envelope. I do the request by this way :

$envelopeDefinition = new EnvelopeDefinition([
    'email_subject' => 'Please sign',
]);

$document = new Document([
    'document_base64' => $files,
    'name' => 'Example document',
    'file_extension' => 'pdf',
    'document_id' => 1234
]);
$envelopeDefinition->setDocuments([$document]);

$signers new Signer([
    'email' => $signer->getEmail(),
    'name' => $signer->getFirstName() . ' ' . $signer->getLastName(),
    'recipient_id' => 5678,
]);
$envelopeDefinition->setRecipients(new Recipients(['signers' => [$signer]]));

$envelopeDefinition->setStatus(self::ENVELOPE_STATUS_SENT);

$envelopeApi = new EnvelopesApi($apiClient);
$envelopeApi->createEnvelope(
    $accountId,
    $envelopeDefinition
);

Did I make any error somwhere ?

Thanks