Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Alfa Sign
    • Algolia
    • Algolia Webshop
    • API
    • Audit
    • Avatars
    • BTRL (Banca Transilvania iPay)
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Emag Checker
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • System Notifications
    • Localisation
    • Lockable Models
    • Logs
    • Mails
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Projects
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Send SMS (Sendsms.ro)
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Sunrise Sunset
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Alfa Sign

LicenseStableLaravelPHP

Description

Laravel Enso backend integration package for Alfa Sign remote electronic signing services. Exposes SOAP-based actions for sending files and computing document hashes, with centralized settings management and encrypted authentication token storage.

Installation

This package is consumed as a private Composer path repository within the Enso application:

{
    "repositories": [
        {
            "type": "path",
            "url": "vendor/laravel-enso/alfasign"
        }
    ],
    "require": {
        "laravel-enso/alfa-sign": "*@dev"
    }
}

After adding it, run:

composer update laravel-enso/alfa-sign
php artisan migrate

Features

  • SOAP integration with the Alfa Sign remote signing service via laravel-enso/api Action, SoapEndpoint, and SoapResponse
  • SendFile operation — sends a document to Alfa Sign for signing and returns a new File model with the signed PDF
  • SendHash operation — computes a SHA-256 hash of a document and submits it to Alfa Sign for signing
  • Settings model with encrypted auth_token (via LaravelEnso\Helpers\Casts\Encrypt) and configurable WSDL url and enabled flag
  • Dynamic service enablement — operations check Settings::enabled() at runtime and skip gracefully when disabled
  • CRUD endpoints for managing integration settings from the Enso admin UI
  • Enso-compatible migration for the alfasign_settings table, menu structure ("Integrations → Alfasign → Settings"), and permissions

Usage

Sending a file for signing

use LaravelEnso\AlfaSign\Services\SendFile;
use LaravelEnso\Files\Models\File;

$signedFile = (new SendFile(File::find($id)))->handle();

Returns a new File instance containing the signed PDF returned by Alfa Sign.

Computing and submitting a document hash

use LaravelEnso\AlfaSign\Services\SendHash;
use LaravelEnso\Files\Models\File;

$hash = (new SendHash(File::find($id)))->handle();

Returns the SHA-256 hash string used in the signing request.

Settings management

Settings are managed through the admin UI at Integrations → AlfaSign → Settings. Programmatic access:

use LaravelEnso\AlfaSign\Models\Settings;

$settings = Settings::current(); // retrieves or creates the singleton record
$settings->enabled;              // bool
$settings->auth_token;           // decrypted automatically
$settings->url;                  // Alfa Sign WSDL endpoint URL

The url setting is passed directly to PHP's SoapClient as the WSDL location. For ASMX services, use the service description endpoint, not the browser service page:

https://ca.alfasign.ro/PilotSignTestPrdgm/RemoteSignature.asmx?WSDL

Using the base .asmx URL without ?WSDL may return an HTML service page, which SoapClient cannot parse as WSDL.

Configuration

After publishing:

php artisan vendor:publish --tag=alfa-sign-config

Config file: config/enso/alfa-sign.php

return [
    'settingsId' => env('ALFASIGN_SETTINGS_ID', 1),
];

API

Services

ClassDescription
LaravelEnso\AlfaSign\Services\SendFileSends a File model to Alfa Sign and returns the signed File
LaravelEnso\AlfaSign\Services\SendHashComputes a SHA-256 hash of a File and submits it

Actions

ClassDescription
LaravelEnso\AlfaSign\Actions\SendFileExtends LaravelEnso\Api\Action and handles the SOAP request/response lifecycle for file signing
LaravelEnso\AlfaSign\Actions\SendHashExtends LaravelEnso\Api\Action and handles the SOAP request/response lifecycle for hash signing

SOAP endpoints

ClassDescription
LaravelEnso\AlfaSign\Endpoints\SendFileExtends LaravelEnso\Api\Endpoints\Soap, calls RemotePdfSignature, and exposes a sanitized log payload
LaravelEnso\AlfaSign\Endpoints\SendHashExtends LaravelEnso\Api\Endpoints\Soap, calls RemoteSignatureHash, and exposes a sanitized log payload

Note

The SOAP endpoints pass the authentication token and file contents through arguments() for the actual Alfa Sign call, but keep body() sanitized so API logs and failure notifications do not expose sensitive values.

Models

ClassDescription
LaravelEnso\AlfaSign\Models\SettingsSingleton settings model. Stores url, auth_token (encrypted), enabled

HTTP Endpoints

MethodURIRoute nameDescription
GETapi/integrations/alfaSign/settingsintegrations.alfaSign.settings.indexReturns the settings form payload
PATCHapi/integrations/alfaSign/settings/{settings}integrations.alfaSign.settings.updateUpdates the settings record

Companion Frontend Package

  • @enso-ui/alfa-sign — Vue 3 settings page

Depends On

  • laravel-enso/api — SOAP action, endpoint, response, and logging infrastructure
  • laravel-enso/forms — Enso form service
  • laravel-enso/helpers — Encrypt cast, FactoryResolver
  • laravel-enso/files — File model

Contributions

are welcome. Pull requests are great, but issues are good too. Thank you to all the people who already contributed to Enso!

License

Proprietary. See LICENSE.

Edit this page on GitHub
Last Updated: 5/20/2026, 7:59:19 PM
Prev
Addresses
Next
Algolia