Oathello API Laravel package.
Oathello is the Signing API built for the Finance Industry.
composer require equipmentc/laravel-oathello
php artisan vendor:publish --tag=oathello
OATHELLO_ENDPOINT=https://sign.oathello.com/api/ (optional)
OATHELLO_API_KEY=xyz
OATHELLO_CALLBACK_URL=https://xyz.tld
There are two ways to use this package.
The first is to use the Oathello Base Class to query the Oathello RESTful API directly.
You can find the API Endpoints here https://sign.oathello.com/swagger
use Equipmentc\Oathello\Oathello;
$oathello = new Oathello;
$oathello->get('Session/xyz');
$oathello->post('Session', $array);
Oathello::get('Session/xyz');
Oathello::post('Session', $array);
In this scenario you can use the helper classes OathelloSession & Document to simplify the process.
use Equipmentc\Oathello\Session as OathelloSession;
$documents = [...]; (See a document array example below)
$oathelloSession = new OathelloSession;
$oathelloSession->create($documents [, $metadata = null ]);
or the facade
$documents = [...]; (See a document array example below)
OathelloSession::create($documents [, $metadata = null ]);
$oathelloSession->get($sessionId);
or the facade
OathelloSession::get($sessionId);
$oathelloSession->cancel($sessionId);
or the facade
OathelloSession::cancel($sessionId);
use Equipmentc\Oathello\Document;
$document = new Document;
$file = $document->get($documentID);
$document->download($file);
or the facade
$file = Document::get($documentID);
Document::download($file);
@document(SESSION_ID, DOCUMENT_ID, SIGNER_ID (optional))
@onDocumentSigned
// add your javascript without script tags
@endonDocumentSigned
@onSessionFinished
// add your javascript without script tags
@endonSessionFinished
Add your own API key and callback url to the phpunit.xml file.
$documents = [[
'title' => 'Example',
'fileName' => 'example.pdf',
'mode' => 'Signing',
'content' => '{{YOUR_BASE64_ENCODED_DOCUMENT}}',
"instructions" => [[
"userInputFields" => [[
"title" => "Add signature",
"type" => "signature",
"for" => "signer",
"region" => [
"pageNumber" => 1,
"x" => 260,
"y" => 395,
"width" => 120,
"height" => 20,
"isVisible" => true,
],
"declarations" => []
]],
]],
"textFields" => [[
"content" => "[DATE]",
"region" => [
"pageNumber" => 1,
"x" => 280,
"y" => 735,
"width" => 60,
"height" => 10,
"isVisible" => true
],
"fontSize" => 8,
]],
]];