From DocuSign, I'm Mei Hsieh, a member of the developer center
team.
In this screencast, I'll walk through installing and running
the PHP Quickstart on Windows and the embedded signing code
example.
The prerequisite to this video is an unzipped Quickstart ZIP
file.
If you haven't yet downloaded your PHP Quickstart,
please first follow the steps in the Quickstart overview
page, or the "How to Download Quickstart" video.
Quickstart is a software wizard that packages a personalized
code example launcher.
You can choose from eight programming languages.
The Quickstart Wizard configures an app
in the developers DocuSign account
that can make API calls.
These steps are completed for the developer.
The launcher is downloaded from GitHub.
An integration key is created in the developer's account.
A secret key is created to enable Authorization Code
Grant.
An RSA key pair is created to enable JWT Grant.
Redirection URLs are added, and the configuration file
is modified with the developers personalized information.
To run the PHP Quickstart Launcher
I must have the PHP prerequisite software installed.
This list of prerequisites can be
found in the Read Me on our GitHub page
at GitHub.com docusign/code examples-php.
This Read Me is also included in the Quickstart ZIP file.
The Read Me has a description of all the API code
examples with their source links to GitHub.
I'll scroll to the installation prerequisites section.
It says, "Note: If you downloaded this code using
Quickstart from the DocuSign Developer Center,
skip items 1 and 2 below, as they're automatically
created for you."
The PHP prerequisites are steps 3 and 4
because Quickstart takes care of step 5
by repopulating my developer account information,
which I'll show later.
In order to install and run the PHP Launcher,
I'll need PHP version 7.2 or later.
Note that PHP version 7.2 or later
is included with the XAMPP download
if you're using the Apache web server.
I'll also need composer setup in my path environment variable
so I can invoke it from any folder.
I can follow the links to download the applications.
Since I'm using the XAMPP/Apache web server,
I'll scroll to the XAMPP/Apache web
server instructions in the Read Me.
In the first sentence there's a link to download XAMPP.
Next, it says, " 1.
Unzip the PHP Quickstart file, or download or clone the code
examples PHP repository into your C:/xampp/htdocs folder."
The Quickstart automatically downloads
into my Downloads folder.
I'll unzip my Quickstart ZIP file into my C:/xampp/htdocs
folder.
I'm in my unzipped Quickstart folder,
C:/xampp/htdocs tally customer portal-PHP.
Note that the Quickstart Wizard appends a dash and the code
language on the end of my Quickstart folder name.
Also, since I'm using the Apache web server,
there can't be any spaces in my PHP Quickstart folder name.
If there are spaces the PHP launcher
won't run on the Apache web server.
I can easily replace spaces in my Quickstart folder name
with underscores.
Quickstart enables developers to quickly run DocuSign code
examples by configuring a launcher with the developers
account information.
For the PHP Quickstart this configuration file
is located in the top level of my Quickstart folder,
and is named DSConfig PHP.
Aside from my email address and name, my unique client ID,
client secret, and impersonated user
ID are also displayed in the configuration file.
In my DocuSign developer account the client ID
is called the Integration Key.
Client ID is the standard OAuth term.
Integration Key is a DocuSign term.
Since it contains personal information,
please don't store this DS Config PHP
file in your source control.
I can also view and modify the source files
in the Quickstart folder, and see my changes
when running that code example.
The PHP Quickstart launcher will directly
open the embedded signing code example
page, which I'll show later.
Here's the code for embedded signing in the source folder.
The file name is eg001 embedded signing PHP.
I'll change the name of the DocuSign document
from Example Document to Hello World.
This name will be shown when the document is
presented in the browser.
I use Control-S to save my changes.
"2.
Switch to your Quickstart folder,
C:/dc/xampp/htdocs Quickstart folder name,
or C:/dc/xampp/htdocs/code examples PHP."
I'll use Git Bash to navigate to my unzipped Quickstart start
folder.
Tally_customer_portal-PHP.
"3.
Run Composer Install to install the dependencies listed
in the composer.json file."
Since I have Composer set up in my path environment variable,
I can call Composer from any folder, I run Composer Install.
All the dependencies have been installed.
"4.
Run XAMPP as Administrator."
On the champ XAMPP Control Panel, to the left of Apache,
select the red X to install Apache web server.
First, I'll ensure I don't have another web server running
on port 8080, and then I'll run XAMPP as Administrator.
On the XAMPP Control Panel, to the left of Apache,
I'll select the red X install Apache web server.
The dialog box says, click "Click Yes
to install the Apache service."
I'll select, Yes.
The red X becomes a green check mark.
"5.
On the XAMPP Control Panel, to the right of Apache,
select the Config button, then Apache httpd.conf."
The httpd.conf file opens in Notepad.
"6.
In the httpd.conf file, change the default listen80
to listen8080."
I've already commented out the default
listen 80, and added listen 8080.
"7.
In the httpd.conf file, change the default server name
Localhost 80 to server name Localhost 8080."
I've already commented out the default server
name Localhost 80, and added server name, Localhost 8080.
"8.
In the httpd.conf file, change the default document route,
C:/xampp/htdocs/ directory/xampp/htdocs
to document route C:/xampp/htdocs/
Quickstartfolder name-PHP/directo
ry/xampp/htdocs/ Quickstartfoldername-PHP."
I will copy and paste my Quickstart folder name,
ensuring there are no spaces.
I use Control-S to save my changes.
"9.
On the XAMPP Control Panel, to the right of Apache,
select the Start button.
Apache runs.
10.
Open a browser to HTTP:/Localhost 8080/public."
I see the consent window from the application, Tally Customer
portal.
In the Authorization Code Grant Flow,
the application obtains consent from the individual user
to perform actions on their behalf,
then receives an Authorization Code
that can be exchanged for an access
token, which is required to make API calls.
Once the user has granted consent to an application
they will not be prompted again unless consent is revoked.
I click Accept.
Next, I see the embedded signing code example.
All Quickstarts are pre-configured to run this code
example.
Embedded signing demonstrates how
to collect signatures directly within my app
without emailing the signer.
Also linked are the API methods used, Envelopes Create,
and Envelope Views, Create Recipient.
The links will take me to the developer center pages
that describe those methods.
The link to the source file will show me the code
for embedded signing in GitHub.
Now the signer email and name have been pre-populated
with my developer account information,
I can change the signer email and name.
I click Submit to send the envelope.
I'm taken directly to the document.
Now I scroll to the bottom of the document,
and see that the document name is no longer Example Document,
but has been changed to Hello World, per my modification.
I'm going to sign the document and click Finish.
I'm taken to the Signing Complete page.
I click Continue.
Now, I see the PHP launcher homepage with all the code
examples, I can run the other code examples as well.
All these code examples are also available
in the other Quickstart launchers, Bash, CSharp, Java,
Node.js, PowerShell, Python, and Ruby.
If you have any questions about how
to develop your integration with DocuSign,
here are some resources.
I recommend checking out the developer center How To guides,
going to Stack Overflow, reaching out to support,
or signing up for API Office Hours.
That's it.
Thanks for tuning in.
Please send questions and comments
to developers, at DocuSign.com.