Download the PHP package hellosign/hellosign-php-sdk without Composer
On this page you can find all versions of the php package hellosign/hellosign-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hellosign/hellosign-php-sdk
More information about hellosign/hellosign-php-sdk
Files in hellosign/hellosign-php-sdk
Package hellosign-php-sdk
Short Description This is the official PHP wrapper for HelloSign's API
License
Informations about the package hellosign-php-sdk
⚠ This SDK has been deprecated ⚠
This SDK is now deprecated and will no longer receive feature updates or bug fixes. Security fixes will still be applied as needed.
The new dropbox/sign
SDK can be found at hellosign/dropbox-sign-php!
The new SDK and this legacy SDK are not backwards-compatible!
Please see here for a comprehensive migration guide.
HelloSign PHP SDK
This is the official PHP SDK for HelloSign's API. View API Documentation and Examples.
Installation
Requirements
The latest version of the SDK requires PHP version 8.0 or higher. For PHP 7.x use SDK version 3.7.*
You can import this SDK into your library two ways, either through including the base HelloSign.php file into your project or using Composer.
To use Composer:
-
First, install Composer if you don't have it already
-
Create a
composer.json
file and add the following: -
Install
hellosign-php-sdk
package via Composer -
Include the library in your script
- See below for how to configure your Client class.
Configuration
All HelloSign API requests can be made using the HelloSign\Client
class. This class must be initialized with your authentication details such as an API key (preferred), email/password combo, or OAuth credentials.
API key Config
Email/Password Config
Oauth Config
Your app users are almost ready to start signing! See below for the most common use cases for this wrapper.
Usage
You can test your authentication by calling
Retrieving fields returned from the API
Using magic methods
Or if you want to get all attributes in an array
Creating a Signature Request
To specify a URL to a remote file instead use:
If you are using Text Tags in your document, you can enable and configure them through the respective methods:
Or if you want to set Form Fields per Document:
Retrieving a User's Templates
The HelloSign API provides paged lists for user templates and signature requests. These lists are represented as objects that can be iterated upon.
Creating a Signature Request from a Template
Checking the Status of a Signature Request
Creating an Embedded Signature Request to use for Embedded Signing
Refer to the (Embedded Signing Walkthrough)[https://app.hellosign.com/api/embeddedSigningWalkthrough] for more details.
Creating an Embedded Template draft
Creating an Unclaimed Draft to use for Embedded Requesting
Enabling OAuth
Displaying warnings
Any warnings returned from the API can be accessed via the returned object / list via the getWarnings method:
``
Testing
This project contains PHPUnit tests that check the SDK code and can also be referenced for examples. Most are functional and integrated tests that walk through real user scenarios.
In order to pass the unit tests, you will need:
- The API Key for a confirmed HelloSign account
- The client ID and secret key from a confirmed HelloSign API App
- A HelloSign subscription (to create a team)
- A HelloSign API subscription (to access paid API endpoints)
- A template with 1 signer role named 'Signer'
- A Team with 1 additional team member
*** WARNING: these tests will add and remove users from your team. Use with caution.
To run the tests
- Copy file
phpunit.xml.dist
tophpunit.xml
- Edit the new file and enter your values for
API_KEY
,CLIENT_ID
,CLIENT_SECRET
,CALLBACK_URL
,API_URL
, ANDOAUTH_TOKEN_URL
- Run
./vendor/bin/phpunit