Skip to content

This script will download and localize all modules within a strategy. If the connection between the API and FS service is broken, the javaScript client will re-rout simple interactions locally.

License

Notifications You must be signed in to change notification settings

form-synergy/localize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Localize Fallback

This script will download and localize all modules within a strategy. If the connection between the API and FS service is broken, the javaScript client will re-rout simple interactions locally.

Install using composer

composer require form-synergy/custom-module

Include the library

require '/vendor/autoload.php';

Enable session management

\FormSynergy\Session::enable();

Import the Form Synergy class

use \FormSynergy\Fs as FS;

You will need to retrieve your credentials in the Form Synergy console.

Console Access: https://formsynergy.com/console/

  • $profileid = '';
  • $apikey = '';
  • $apisecret = '';

If you are a reseller

  • $resellerid = '';

Configuration

FS::Config([
    'version' => 'v1',
    'protocol' => 'https',
    'endpoint' => 'api.formsynergy.com',
    'apikey' => $apikey,
    'secretkey' => $secretkey,
     //'resellerid' => $resellerid,  If you are a reseller
    'max_auth_count' => 15,
]);

local storage

Enable local storage to store downloads and responses.

FS::Storage( '/', 'local-storage' );

Load account

Load and start managing an account.

$api = FS::Api()->Load($profileid);

Run script

Update modid, the unique identifier of the strategy.

\FormSynergy\Localize_Fallback::Run([
    'modid' => '',
])

About

This script will download and localize all modules within a strategy. If the connection between the API and FS service is broken, the javaScript client will re-rout simple interactions locally.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages