1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Docusign SignHere tab not showing when Documents are sent through a Laravel app

Discussão em 'Outras Linguagens' iniciado por MKOCH, Outubro 10, 2024 às 06:52.

  1. MKOCH

    MKOCH Guest

    I am working on a Laravel application where I have integrated DocuSign for sending documents for electronic signatures. I followed the official DocuSign API documentation to set up JWT authentication and successfully send documents. However, when I send a document for signing, the signature field does not appear on the document.

    As I mentioned, I successfully send the documents and the code for building the envelope is the following:

    public function buildEnvelope(Request $request): EnvelopeDefinition
    {
    $fileContent = $request->file('formFile')->get();
    $fileName = $request->file('formFile')->getClientOriginalName();
    $fileExtension = $request->file('formFile')->getClientOriginalExtension();
    $recipientEmail = $request['email'];
    $recipientName = $request['name'];

    $document = new Document([
    'document_id' => "1",
    'document_base64' => base64_encode($fileContent),
    'file_extension' => $fileExtension,
    'name' => $fileName
    ]);

    $sign_here_tab = new SignHere([
    'anchor_string' => "**signature**",
    'page_number' => "1",
    'anchor_units' => "pixels",
    'anchor_x_offset' => "100",
    'anchor_y_offset' => "300"
    ]);

    $tabs = new Tabs([
    'sign_here_tabs' => [$sign_here_tab]
    ]);

    $signer = new Signer([
    'email' => $recipientEmail,
    'name' => $recipientName,
    'recipient_id' => "1",
    'tabs' => $tabs
    ]);

    $recipients = new Recipients([
    'signers' => [$signer]
    ]);

    $inlineTemplate = new InlineTemplate([
    'recipients' => $recipients,
    'sequence' => "1"
    ]);

    $compositeTemplate = new CompositeTemplate([
    'composite_template_id' => "1",
    'document' => $document,
    'inline_templates' => [$inlineTemplate]
    ]);

    return new EnvelopeDefinition([
    'composite_templates' => [$compositeTemplate],
    'email_subject' => "Please sign",
    'status' => "sent"
    ]);
    }


    I have specified the page number, some random coordinates, anchor string, and anchor units and expected that on page 1 somwhere I'd see the text signature

    Continue reading...

Compartilhe esta Página