Download the PHP package penneo/penneo-sdk-php without Composer

On this page you can find all versions of the php package penneo/penneo-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package penneo-sdk-php

Penneo SDK for PHP

Penneo is all about digitizing the process of signing documents and contacts. The Penneo SDK for PHP enables PHP developers to use digital signing of documents in their PHP code. Get more info at penneo.com about how to become a customer.

Prerequisites

The Penneo SDK for PHP requires that you are using PHP 5.3 or newer. Also you must have a recent version of cURL >= 7.16.2 compiled with OpenSSL and zlib.

Getting Started

You can install the SDK by simply cloning or downloading the source, or you can use Composer. We recommend that you use Composer:

Installing via Composer

The recommended way to install the Penneo SDK is through Composer.

Next, update your project's composer.json file to include the SDK:

After installing, you need to require Composer's autoloader before calling any SDK functions e.g.:

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org.

Documentation

This section documents the different objects available through the SDK and how to use them.

Authentication

The SDK supports three different methods of authentication:

OAuth 2.0

Read more about OAuth 2.0 here.

OAuth client

You will need an OAuth client to be used by your integration to perform the OAuth 2.0 authentication flow.

To create such a client please open a ticket in our Support Center asking for the creation of an integration client. Please specify in the request the name of the client and the redirect_uri towards which you will receive the callback requests.

We will provide you with a client_id and client_secret.

Programmatic authentication using OAuth

To set up programmatic access, you'll need to initialize the API connector with oauth, by building it using your client_id, client_secret and your chosen redirect_uri, alongside the API key and secret.

:point_right: see a full, functional example in docs/programmatic_oauth_example.php.

Then you can start making API requests.

Interactive authentication using OAuth

To initiate interactive authentication, you will first need to build the authorization URI using your client_id, client_secret and your chosen redirect_uri, then redirect the user to the $authorizationUrl:

The environment can either be sandbox for testing, or production for the live system.

Following the standard OAuth 2.0 flow, the user is brought to the authorization page where they can log in into Penneo with their chosen method (e.g. username and password, Google, Microsoft, etc.) and authorize your application to access their Penneo account.

The user is then redirected back to the redirect_uri with a single-use authorization code.

Exchanging authorization code with access token

Now you have a single-use authorization code and a code verifier that you can use to exchange them for an access_token which will be stored in the token storage defined previously in the OAuthBuilder:

When the authorization code is successfully exchanged with a new token, you can then initialize the OAuth 2.0 connector using the already authorized $oAuth instance:

:point_right: see a full, functional example in docs/interactive_oauth_example.php.

OAuth Token Storage

The SDK will store the OAuth 2.0 token in the session using the SessionTokenStorage by default. If you want to use another storage, you can implement your own by using the TokenStorage interface.

WSSE

The Web Services Security (WSSE) authentication is done in a single line of code, using your Penneo API credentials:

If you have a reseller account, you can carry out operations on behalf of one of your customers, by specifying the customer id as well:

The endpoint URL can point to either the sandbox (for testing) or the live system. Both endpoint URLs are available on request.

Problems in production?

You should add a logger by calling ApiConnector::setLogger(). If you contact support, please include any relevant requestIds you find in the logs.

Document signing

Identity validation

Quick Examples

Signing a document (simple)

In this example, we show how to create a document with a single signer. The link to the Penneo signing portal, where the actual signing takes place, is printed as a result.

Validating a person (money laundering regulations)

In this example we demontrate, how to validate a person from his/her electronic ID and social security number. The result is a link to the Penneo validation page. The person in question must follow the link and complete some actions in order to be validated.

Resources


All versions of penneo-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
psr/log Version ^1.0|^2.0|^3.0
ext-json Version *
guzzlehttp/guzzle Version ^7.2
nesbot/carbon Version ^2.71
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package penneo/penneo-sdk-php contains the following files

Loading the files please wait ....