The Smart-ID PHP client can be used for easy integration of the Smart-ID solution to information systems or e-services

Overview

Build Status Latest Version License: LGPL v3

Smart-ID PHP client

Introduction

The Smart-ID PHP client can be used for easy integration of the Smart-ID solution to information systems or e-services.

Features

  • Simple interface for user authentication

Smart-ID PHP client works with PHP 7.4 and PHP 8+

This PHP client cannot be used to create digitally signed containers because PHP does not have a library like DigiDoc4J..

Installation

The recommended way to install Smart-ID PHP Client is through Composer:

composer require sk-id-solutions/smart-id-php-client "2.3"

See packagist for latest published version and changelog for details.

How to use it

Configure client details and https pinning

Used to prevent man-in-the-middle attacks. More on man in the middle attacks in case of using smart id.

Setting the client to trust specific public keys. Production SSL certificates used can be found here and demo environment certificates are here.

The setPublicSslKeys method requires a string of sha256 hashes of the public keys used delimited with ";". You can extract hashes from certificates using next openssl command.

openssl x509 -inform PEM -in certificate.pem -noout -pubkey | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64

The supplied string should be of format sha256//sha256-hash-of-the-public-key;

$this->client = new Client();
$this->client
    ->setRelyingPartyUUID( '00000000-0000-0000-0000-000000000000' ) // In production replace with your UUID
    ->setRelyingPartyName( 'DEMO' ) // In production replace with your name
    ->setHostUrl( 'https://sid.demo.sk.ee/smart-id-rp/v2/' ) // In production replace with production service URL
        // in production replace with correct server SSL key
    ->setPublicSslKeys("sha256//nTL2Ju/1Mt+WAHeejqZHtgPNRu049iUcXOPq0GmRgJg=;sha256//wkdgNtKpKzMtH/zoLkgeScp1Ux4TLm3sUldobVGA/g4=");

Authenticating with semantics identifier

Following example also demonstrates how to validate authentication result and how to handle exceptions.

client->authentication() ->createAuthentication() ->withSemanticsIdentifier( $semanticsIdentifier ) ->withAuthenticationHash( $authenticationHash ) ->withCertificateLevel( CertificateLevelCode::QUALIFIED ) // Certificate level can either be "QUALIFIED" or "ADVANCED" ->withAllowedInteractionsOrder((array( Interaction::ofTypeVerificationCodeChoice("Enter awesome portal?"), Interaction::ofTypeDisplayTextAndPIN("Enter awesome portal?")))) ->authenticate(); // this blocks until user has responded } catch (UserRefusedException $e) { throw new RuntimeException("You pressed cancel in Smart-ID app."); } catch (UserSelectedWrongVerificationCodeException $e) { throw new RuntimeException("You selected wrong verification code in Smart-ID app. Please try again. "); } catch (SessionTimeoutException $e) { throw new RuntimeException("Session timed out (you didn't enter PIN1 in Smart-ID app)."); } catch (UserAccountNotFoundException $e) { throw new RuntimeException("User does not have a Smart-ID account"); } catch (UserAccountException $e) { throw new RuntimeException("Unable to authenticate due to a problem with your Smart-ID account."); } catch (EnduringSmartIdException $e) { throw new RuntimeException("Problem with connecting to Smart-ID service. Please try again later."); } catch (SmartIdException $e) { throw new RuntimeException("Smart-ID authentication process failed for uncertain reason.", $e); } // create a folder with name "trusted_certificates" and set path to that folder here: $pathToFolderWithTrustedCertificates = __DIR__ . '/../../../resources'; $authenticationResponseValidator = new AuthenticationResponseValidator($pathToFolderWithTrustedCertificates); $authenticationResult = $authenticationResponseValidator->validate( $authenticationResponse ); if ($authenticationResult->isValid()) { echo "Hooray! Authentication result is valid"; } else { throw new RuntimeException("Error! Response is not valid! Error(s): ". implode(",", $authenticationResult->getErrors())); } $authenticationIdentity = $authenticationResult->getAuthenticationIdentity(); echo "hello name: " . $authenticationIdentity->getGivenName() . ' ' . $authenticationIdentity->getSurName() . "\n"; echo "from " . $authenticationIdentity->getCountry() . "\n"; echo "born " . $authenticationIdentity->getDateOfBirth()->format("D d F o") . "\n"; // you might need this if you want to start authentication with document number echo "Authenticated user documentNumber is: ".$authenticationResponse->getDocumentNumber(). "\n";">
$semanticsIdentifier = SemanticsIdentifier::builder()
    ->withSemanticsIdentifierType('PNO')
    ->withCountryCode('LT')
    ->withIdentifier('30303039914')
    ->build();

// For security reasons a new hash value must be created for each new authentication request
$authenticationHash = AuthenticationHash::generate();

$verificationCode = $authenticationHash->calculateVerificationCode();

// display verification code to the user
echo "Verification code: " . $verificationCode . "\n";

$authenticationResponse = null;
try
{
  $authenticationResponse = $this->client->authentication()
      ->createAuthentication()
      ->withSemanticsIdentifier( $semanticsIdentifier ) 
      ->withAuthenticationHash( $authenticationHash )
      ->withCertificateLevel( CertificateLevelCode::QUALIFIED ) // Certificate level can either be "QUALIFIED" or "ADVANCED"
      ->withAllowedInteractionsOrder((array(
          Interaction::ofTypeVerificationCodeChoice("Enter awesome portal?"),
          Interaction::ofTypeDisplayTextAndPIN("Enter awesome portal?"))))
      ->authenticate(); // this blocks until user has responded
}
catch (UserRefusedException $e) {
  throw new RuntimeException("You pressed cancel in Smart-ID app.");
}
catch (UserSelectedWrongVerificationCodeException $e) {
  throw new RuntimeException("You selected wrong verification code in Smart-ID app. Please try again. ");
}
catch (SessionTimeoutException $e) {
  throw new RuntimeException("Session timed out (you didn't enter PIN1 in Smart-ID app).");
}
catch (UserAccountNotFoundException $e) {
  throw new RuntimeException("User does not have a Smart-ID account");
}
catch (UserAccountException $e) {
  throw new RuntimeException("Unable to authenticate due to a problem with your Smart-ID account.");
}
catch (EnduringSmartIdException $e) {
  throw new RuntimeException("Problem with connecting to Smart-ID service. Please try again later.");
}
catch (SmartIdException $e) {
  throw new RuntimeException("Smart-ID authentication process failed for uncertain reason.", $e);
}

// create a folder with name "trusted_certificates" and set path to that folder here:
$pathToFolderWithTrustedCertificates = __DIR__ . '/../../../resources';

$authenticationResponseValidator = new AuthenticationResponseValidator($pathToFolderWithTrustedCertificates);
$authenticationResult = $authenticationResponseValidator->validate( $authenticationResponse );


if ($authenticationResult->isValid()) {
  echo "Hooray! Authentication result is valid";
}
else {
   throw new RuntimeException("Error! Response is not valid! Error(s): ". implode(",", $authenticationResult->getErrors()));
}



$authenticationIdentity = $authenticationResult->getAuthenticationIdentity();

echo "hello name: " . $authenticationIdentity->getGivenName() . ' ' . $authenticationIdentity->getSurName() . "\n";
echo "from " . $authenticationIdentity->getCountry() . "\n";
echo "born " . $authenticationIdentity->getDateOfBirth()->format("D d F o") . "\n";

// you might need this if you want to start authentication with document number
echo "Authenticated user documentNumber is: ".$authenticationResponse->getDocumentNumber(). "\n";

Validate authentication result

To validate the authentication result (that it was signed by Smart-ID and not some man-in-the-middle or accidentally connecting to demo environment from production). You need to create directory trusted_certificates and place smart-id certificates in there. You can get the needed certificates from links that are described in the "https pinning" chapter above.

Example path to resource directory: $resourceLocation = '/path/to/resource'; where it will look for directory named trusted_certificates and read certs from there. If no path is specified it will take trusted certs, that are provided by client itself. They are located at src/resources/trusted_certificates.

Authenticating with document number

It might be needed to use document number instead of semantics identifier when you are (for some reason) re-authenticating the user in a short period of time and you want the user to use the same device as previously.

If user has several Smart-ID accounts (for example one in phone and one in tablet) then when authenticating with semantics identifier both of the devices initiate the flow (user can pick either one of the devices and type in PIN there). Since document number is device-specific then when you use document number only one of user devices starts the authentication flow.

You get the documentNumber of the user after successful authentication. See the example above where documentNumber is logged out in the end.

withAllowedInteractionsOrder((array( Interaction::ofTypeVerificationCodeChoice("Enter awesome portal?"), Interaction::ofTypeDisplayTextAndPIN("Enter awesome portal?")))) ->authenticate(); // this blocks until user has responded">
$authenticationResponse = $this->client->authentication()
  ->createAuthentication()
  ->withDocumentNumber( 'PNOLV-329999-99901-AAAA-Q' )
  ->withAuthenticationHash( $authenticationHash )
  ->withCertificateLevel( CertificateLevelCode::QUALIFIED ) // Certificate level can either be "QUALIFIED" or "ADVANCED"
  ->withAllowedInteractionsOrder((array(
      Interaction::ofTypeVerificationCodeChoice("Enter awesome portal?"),
      Interaction::ofTypeDisplayTextAndPIN("Enter awesome portal?"))))
  ->authenticate(); // this blocks until user has responded

Authenticate with polling every 5 seconds

Previous examples block until the user has typed in PIN code or pressed cancel or authentication has failed for some other reason (like timeout). This example demonstrates polling the status every 5 seconds.

withAllowedInteractionsOrder((array( Interaction::ofTypeVerificationCodeChoice("Ready to poll?"), Interaction::ofTypeDisplayTextAndPIN("Ready to poll status repeatedly?")))) ->startAuthenticationAndReturnSessionId(); } catch (SmartIdException $e) { // Handle exception (more on exceptions in "Handling intentional exceptions") throw new RuntimeException("Authentication failed. NB! Use exception handling blocks from above example.". $e); } $authenticationResponse = null; try { for ( $i = 0; $i <= 10; $i++ ) { $authenticationResponse = $this->client->authentication() ->createSessionStatusFetcher() ->withSessionId( $sessionId ) ->withAuthenticationHash( $authenticationHash ) ->withSessionStatusResponseSocketTimeoutMs( 10000 ) ->getAuthenticationResponse(); if ( !$authenticationResponse->isRunningState() ) { break; } sleep( 5 ); } } catch (SmartIdException $e) { throw new RuntimeException("Authentication failed. NB! Use exception handling blocks from above example.". $e); } // validate authentication result, get authentication person details">
$sessionId = null;
try
{
  $sessionId = $this->client->authentication()
      ->createAuthentication()
      ->withSemanticsIdentifier( $semanticsIdentifier ) // or with document number: ->withDocumentNumber( 'PNOEE-10101010005-Z1B2-Q' )
      ->withAuthenticationHash( $authenticationHash )
      ->withCertificateLevel( CertificateLevelCode::QUALIFIED ) // Certificate level can either be "QUALIFIED" or "ADVANCED"
      ->withAllowedInteractionsOrder((array(
          Interaction::ofTypeVerificationCodeChoice("Ready to poll?"),
          Interaction::ofTypeDisplayTextAndPIN("Ready to poll status repeatedly?"))))
      ->startAuthenticationAndReturnSessionId();
}
catch (SmartIdException $e) {
  // Handle exception (more on exceptions in "Handling intentional exceptions")
  throw new RuntimeException("Authentication failed. NB! Use exception handling blocks from above example.". $e);
}

$authenticationResponse = null;
try
{
  for ( $i = 0; $i <= 10; $i++ )
  {
    $authenticationResponse = $this->client->authentication()
        ->createSessionStatusFetcher()
        ->withSessionId( $sessionId )
        ->withAuthenticationHash( $authenticationHash )
        ->withSessionStatusResponseSocketTimeoutMs( 10000 )
        ->getAuthenticationResponse();

    if ( !$authenticationResponse->isRunningState() )
    {
      break;
    }
    sleep( 5 );
  }
}
catch (SmartIdException $e) {
  throw new RuntimeException("Authentication failed. NB! Use exception handling blocks from above example.". $e);
}

// validate authentication result, get authentication person details
Comments
  • Binding Smart-ID calls to a specific interface

    Binding Smart-ID calls to a specific interface

    Since SK uses IP whitelisting to authorize SmartID requests, it's important that in case of multiple IP addresses/interfaces on a server the request is made from the right IP.

    In PHP/curl, this can be achieved by setting: curl_setopt($ch,CURLOPT_INTERFACE,'1.2.3.4');

    Would there be a possibility to add a setInterface() method to Sk\SmartId\Client that would then be passed on to the requests that set the correct interface?

    opened by indreksiitan 4
  • Error! Response is not valid! Error(s): Signature verification failed.

    Error! Response is not valid! Error(s): Signature verification failed.

    Hello there.

    So basically I use 2 calls to identify a customer

    1st I call session id with startAuthenticationAndReturnSessionId and semanticsIdentifier Then continuously i check for session with createSessionStatusFetcher but when i get response and i try to validate it with authenticationResponseValidator i get runtime exception

    An uncaught Exception was encountered Type: RuntimeException Message: Error! Response is not valid! Error(s): Signature verification failed.

    And $authenticationResponse->getDocumentNumber() is empty

    Path to trusted certificates is defined and when i use authenticate method everything is working correctly

    For me it seems strange when i try to validate the session no the user i get issue with this

    Thanks

    opened by fixedlv 2
  • getPublicSslKeys error fix

    getPublicSslKeys error fix

    In Curl.php line 357:

    [Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to Sk\SmartId\Util\Curl::setPublicSslKeys() must be of the type string, null given, called in /Users/Markas/Work/markid.application/vendor/sk-id-solutions/smart-id-php-client/src/Sk/SmartId/Api/SmartIdRe stConnector.php on line 177

    opened by markas 2
  • Update README.md

    Update README.md

    "RP API endpoint authentication" hashtag link changed in: https://github.com/SK-EID/smart-id-documentation/commit/a86024d56716464b9279a35a5798f22b9038c1bb

    opened by rkaalma 1
  • Fixed PSR-0 autoloading issue

    Fixed PSR-0 autoloading issue

    This PR fixes an composer CertificateAttributeUtilTest.php file warning where namespace doesn't comply with psr-0 standard.

    This warning triggers every time after running composer dump-autoload

    Class Sk\SmartId\Tests\Api\Util\CertificateAttributeUtilTest located in ./vendor/sk-id-solutions/smart-id-php-client/tests/Sk/SmartId/Tests/Util/CertificateAttributeUtilTest.php does not comply with psr-0 autoloading standard. Skipping.

    opened by edgarsn 1
  • SessionStatus - interactionFlowUsed is not set.

    SessionStatus - interactionFlowUsed is not set.

    Hi!

    I updated to version 2.2 and after some modifications I got stuck with following error:

    Uncaught TypeError: Return value of Sk\SmartId\Api\Data\SessionStatus::getInteractionFlowUsed() must be of the type string, null returned in ../sk-id-solutions/smart-id-php-client/src/Sk/SmartId/Api/Data/SessionStatus.php:154

    My authenticate code is as follows:

    $authenticationResponse = $client->authentication()
      ->createAuthentication()
      ->withSemanticsIdentifier( $identity )
      ->withAuthenticationHash( $authenticationHash )
      ->withAllowedInteractionsOrder([Interaction::ofTypeDisplayTextAndPIN("Text and pin")])
      ->withCertificateLevel( CertificateLevelCode::QUALIFIED )
      ->authenticate();
    

    If I add private $interactionFlowUsed = "displayTextAndPin"; as default to SessionStatus class, it works.

    opened by userrainlaansalu 1
  • PHP 8 - Method ReflectionParameter::getClass() is deprecated

    PHP 8 - Method ReflectionParameter::getClass() is deprecated

    PHP 8 throws an exception:

    Method ReflectionParameter::getClass() is deprecated vendor/sk-id-solutions/smart-id-php-client/src/Sk/SmartId/Api/Data/PropertyMapper.php(134)

    opened by kaidof 1
  • SID Demo SSL key pinning changes have not reached to `packagist.org`

    SID Demo SSL key pinning changes have not reached to `packagist.org`

    A new release to packagist.org would be great. The SID Demo SSL key pinning changes after v1.5.1 release have not reached there. Saves the other potential integrators a lot of time. Took me few hours to find out that the packagist and github latest do not match.

    opened by vellotis 1
  • getPublicSslKeys error fix

    getPublicSslKeys error fix

    In Curl.php line 357:

    [Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to Sk\SmartId\Util\Curl::setPublicSslKeys() must be of the type string, null given, called in /Users/Markas/Work/markid.application/vendor/sk-id-solutions/smart-id-php-client/src/Sk/SmartId/Api/SmartIdRe stConnector.php on line 177

    opened by markas 1
  • Add HTTPS Pinning

    Add HTTPS Pinning

    Smart ID documentation coversHTTPS pinning. Unfortunately it is a little bit tricky and would be nice to have in this package.

    I see that @andrevka has created a pullrequest #18 to address the issue. It is create work but has one drawback. It breaks the backward compatibility. Currently package supports PHP >= 5.6 but with proposed pull request the new minimum requirement is >= 7.0.7

    I had an idea how to make it work even with PHP 5.6 and created a branch for this development: https://github.com/raigu/smart-id-php-client/commits/pinning

    I have a question for maintainer. Is it important to keep backward compatibility? If yes, should I continue with the referred branch?

    My proposed package is not finished. I made this issue to share my thought with @andrevka and maintainer and see if we have mutual interests and can cooperate. What I have not done yet:

    • documentation with samples
    • simplified keys (currently uses PEM but I see @andrevka has used hases, it is shorter)
    • think through how to avoid conditional statements in end application when switching between production and demo environment
    • if detected PHP > 7.0.7 environment then use curl's native pinning functionality

    Will wait feedback from maintainer or @andrevka. If there is interest I/we can continue.

    opened by raigu 1
  • isCertificateTrusted fails

    isCertificateTrusted fails

    not sure if this is a bug or not but when using this library against the Demo environment @ https://sid.demo.sk.ee/smart-id-rp/v1/ the method \Sk\SmartId\Api\AuthenticationResponseValidator::isCertificateTrusted will fail

    when replacing this foreach loop

    foreach ( $this->trustedCACertificates as $trustedCACertificate )
        {
          if ( $this->verifyTrustedCACertificate( $certificateAsResource, $trustedCACertificate ) === true )
          {
            return true;
          }
        }
    

    with the following code, will work and return true

    if ( openssl_x509_checkpurpose( $certificateAsResource, X509_PURPOSE_ANY, $this->trustedCACertificates ) === true ) {
        return true;
    }
    

    why is there a foreach loop anyway when the openssl_x509_checkpurpose can handle a path to certificates or an array of certificate paths

    the certificates in use are

    • TEST_of_EE_Certification_Centre_Root_CA.pem.crt
    • TEST_of_EID-SK_2016.pem.crt
    • TEST_of_NQ-SK_2016.pem.crt

    certificate returned from smart-id is

    -----BEGIN CERTIFICATE-----
    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
    i4cDsw==
    -----END CERTIFICATE-----
    
    opened by viiter 1
Releases(v2.3.1)
  • v2.3.1(Aug 23, 2022)

  • v2.3(Jan 6, 2022)

    Changed

    • If user picks wrong verification code then UserSelectedWrongVerificationCodeException is thrown (previously TechnicalErrorException was thrown)
    • Minimal PHP version lifted to 7.4

    Added

    • Added intermediate exceptions (UserAccountException if there is problem with user Smart-ID account, UserActionException if the exception is caused by user's actions, EnduringSmartIdException if something is wrong with Smart-ID service or the integration configuration is invalid) so there is no need to handle each case independently.
    • New method SmartIdAuthenticationResponse::getDocumentNumber()
    • Usage examples added to README.md
    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Jan 5, 2022)

  • v2.2.1(Dec 7, 2021)

  • v2.2(Sep 27, 2021)

  • v2.1(Sep 24, 2021)

    Changed

    • PHP version upgraded 7.2 -> 7.3
    • PhpUnit upgraded to 5.7 -> 9

    Added

    • New function AuthenticationIdentity->getDateOfBirth() that reads birthdate info from a separate field in certificate or detects it from national identity number. NB This function can return null for some Latvian certificates.
    • New function AuthenticationIdentity->getIdentityNumber() that returns personal identification number without a PNOEE-, IDXLV- etc prefix
    • Return types added to methods
    • Library and PHP version number added to User-Agent header of outgoing requests
    Source code(tar.gz)
    Source code(zip)
  • v2.0(Apr 7, 2021)

    [2.0] - 2021-04-07

    Added

    • Support for Smart id api version 2.0
    • Authentication routes using semantics identifiers
    • Different Interaction types based on enduser device capabilities

    Removed

    • Building request with national identity (Use semantics identifiiers (chapter 5.1.3))
    • Hard coded ssl public keys for demo and live smart id environments (Since this release, relying parties need to specify the public keys used when setting up the client)

    Changed

    • php version >= 7.2
    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(Feb 8, 2021)

  • v1.5.1(Nov 28, 2019)

  • v1.5(Nov 25, 2019)

    [1.5] - 2019-11-25

    Added

    • Http public key pinning #18

    Fixed

    • Poller did not use specified network interface #4
    • Add exception message when user is not found #16

    Changed

    • php version 5.6 to 7.0.7
    Source code(tar.gz)
    Source code(zip)
  • v1.3(Oct 30, 2018)

    Merge pull request #6 from DonRico/master Merge pull request #7 from jeserkin/dds-2500 Merge pull request #8 from jeserkin/dds-2499 Merge pull request #9 from jeserkin/dds-2413

    Source code(tar.gz)
    Source code(zip)
Owner
SK ID Solutions
SK ID Solutions
SK ID Solutions
A links dashboard which can be integrated via HTML into various other systems.

quickdash Newest QuickDash version. Combines the API and Client repositories. Requirements PHP version 7.4 - https://www.php.net/ Composer - https://g

Hugo Soares 0 Aug 11, 2022
API client for Yousign · French eSignature solution.

CyrilBochet/YousignApiClient README translation English Client API pour Yousign · solution de signature électronique française. Sommaire Procédure sim

Cyril BOCHET 3 Dec 1, 2022
Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit 96 Jan 6, 2023
Google PHP API Client Services

Google PHP API Client Services

Google APIs 1.1k Dec 22, 2022
AsyncAws Core - shared classes between all AWS services. It also contains the STS client to handle authentication.

AsyncAws Core The repository contains shared classes between all AWS services. It also contains the STS client to handle authentication. Install compo

Async AWS 54 Dec 14, 2022
Laravel ClickHouse adds CH client integration, generation & execution of ClickHouse database migrations to the Laravel application.

Laravel ClickHouse Introduction Laravel ClickHouse database integration. This package includes generation and execution of the ClickHouse database mig

cybercog 11 Dec 20, 2022
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023
Toxiproxy PHP Client - Toxiproxy makes it easy and trivial to test network conditions, for example low-bandwidth and high-latency situations

Toxiproxy makes it easy and trivial to test network conditions, for example low-bandwidth and high-latency situations. toxiproxy-php-client includes everything needed to get started with configuring Toxiproxy upstream connection and listen endpoints.

Adrian Parker 29 Jun 24, 2022
playSMS is a web interface for SMS gateways and bulk SMS services

README Latest development release is playSMS version 1.4.4-beta4 Latest stable release is playSMS version 1.4.3 Official project website: https://play

playSMS 662 Dec 31, 2022
laravel wrapper for dicom images services

laravel wrapper for dicom images services

Laravel Iran Community 4 Jan 18, 2022
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.

DeviceDetector Code Status Description The Universal Device Detection library that parses User Agents and detects devices (desktop, tablet, mobile, tv

Matomo Analytics 2.4k Jan 9, 2023
This library is for integration with Salesforce via REST API.

xsolve-pl/salesforce-client Introduction This library is for integration with Salesforce via REST API. Licence This library is under the MIT license.

Boldare / XSolve Sp. z o.o. 31 Oct 13, 2022
Laravel Package for 1APP. Learn how to integrate our APIs to build a web or mobile integration to send and accept payments for your application and businesses.

1APP Laravel Library Learn how to integrate our APIs to build a web or mobile integration to accept payments, make payment of Bills and as well custom

O'Bounce Technologies 4 Jul 25, 2022
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.

Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC. This project is a work-in-progress. Code and docume

Web3 PHP 665 Dec 23, 2022
A simple PHP GitHub API client, Object Oriented, tested and documented.

PHP GitHub API A simple Object Oriented wrapper for GitHub API, written with PHP. Uses GitHub API v3 & supports GitHub API v4. The object API (v3) is

KNP Labs 2k Jan 7, 2023
A simple Object Oriented PHP Client for Termii SMS API

Termii Client A simple Object Oriented PHP Client for Termii SMS API. Uses Termii API. Requirements PHP >= 7.2 Guzzlehttp ~6|~7 Installation Via Compo

Ilesanmi Olawale Adedotun 5 Feb 24, 2022
PHP client for Kafka

A library to allow people to communicate to Kafka using plain PHP, compatible with Kafka v0.11+ (due to the way the protocol works).

Luís Cobucci 52 Dec 23, 2022