redcomercio/latch-sdk-php

Latch SDK PHP

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/redcomercio/latch-sdk-php

dev-main 2024-07-22 22:26 UTC

This package is not auto-updated.

Last update: 2025-08-06 01:34:30 UTC


README

LATCH PHP SDK

 PREREQUISITES

USING THE SDK IN PHP

  • Require "latch" sdk using composer

    composer require elevenpaths/latch-sdk-php
    
  • Create a Latch object with the "Application ID" and "Secret" previously obtained.

    $api = new Latch(APP_ID, APP_SECRET);
    
  • Optional settings:

    $api->setProxy(YOUR_PROXY);
    
  • Call to Latch Server. Pairing will return an account id that you should store for future api calls

       $pairResponse = $api->pair("PAIRING_CODE_HERE");
       $statusResponse = $api->status(ACCOUNT_ID_HERE);
       $unpairResponse = $api->unpair(ACCOUNT_ID_HERE);
    
  • After every API call, get Latch response data and errors and handle them.

       $pairResponse->getData();
       $pairResponse->getError();