Laravel

Embedded signing DocuSign laravel

Hello everyone, today we will see how we can do an embedded signing with Docusign in Laravel 8. If you are reading my blog which means you also want to integrate DocuSign with your Laravel Application. Please follow the below instruction to integrate Docusign in one shot.

To integrate Docusign in Laravel, we will follow below steps:

  1. Create a developer account on DocuSign
  2. Create an application and get the keys on DocuSign
  3. Install laravel project
  4. Install Docusign Package
  5. Setting up .env with DocuSign keys
  6. Create Routes
  7. Create Controller
  8. Create Blade File
  9. Test the integration

Step: 1 Create a developer account on DocuSign

To create the developer account on Docusign please click here. this link will redirect you to docusign developer account, you will have something like the below image.

Docusign create account

After the registration, you will receive an account verification email on your registered email, verify that email and proceed.Once you logged in you have image like the below one.

Docusign app and key section

From this section we need API Account ID, please copy API Account ID and place it in safe place we will use it later.

Step: 2 Create an application and get the keys on DocuSign

Now click on ADD APP AND INTEGRATION KEY button to create a new application.

docusign create app

Once you create the app you can see something like the below image.

From here you have to copy integration key and secret key and keep it in a safe place we will use it later.

Step: 3 Install laravel project

Open your command prompt under your htdocs and run the below command

PHP

Step: 4 Install Docusign Package

PHP

Step: 5 Setting up .env with Docusign keys

Add the below in your .env file, and then run php artisan optimize:clear

PHP

Step:6 Create routes

Create routes for the docusign add the below route in your routes/web.php file.

PHP

Step: 7 Create Controller

Now we will create a controller for our routes, to create the controller run the below command in your terminal from the project root folder.

PHP

After creating the controller add the controller namespace in your routes/web.php file on the top.

PHP

see the below image, how my routes.php looks like

docusign routes in laravel application

Now add the below code in your DocusignController.php file

PHP

Note: You must have to add callback URL in your docusign , to get your laravel application get authenticated.

See the below image.

Step:8 Create a blade file

Now create a folder named as docusign under your resouces/views under docusign folder create a file connect.blade.php and write the below code in it.

HTML

Step-9 Test the integration

Now visit this url from your browser http://localhost/docusign/public/docusign , you will have something like the below image.

laravel application connect docusign

Click on connect DocuSign, you will redirect to DocuSign’s official website where they told you to enter your DocuSign email and password, after giving your credentials you will come back to your laravel application with the below image.

docusign auth with laravel application

When you click on the button to sign the document you will have something like the below one.

docusign embeded signing

Here click on continue put signature and press finish, after that you embeded signing process is done and you will come back to your laravel application.

docusign embeded signing

After signing process complete you can see something like the below one.

docusign siging process complete

I hope it works for you. please rate me 5 if it helps you.

Shaiv Roy

Hy Myself shaiv roy, I am a passionate blogger and love to share ideas among people, I am having good experience with laravel, vue js, react, flutter and doing website and app development work from last 7 years.

Related Articles

11 Comments

  1. Please help me,
    How I can share same document to multiple signers?
    I want to signed same document from multiple people

  2. file_get_contents(http://127.0.0.1:8000/doc/World_Wide_Corp_lorem.pdf): Failed to open stream: HTTP request failed!
    

    anyone tell me please how i can resolve this issue?

  3. Hi,

    Please help me,

    I got this error :
    
     file_get_contents(http://127.0.0.1:8000/doc/World_Wide_Corp_lorem.pdf): Failed to open stream: HTTP request failed!
    

    I also tried to change the file and even change the file name but it did not work,

    Do you have any idea about this?

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button