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.
composer require form-synergy/custom-module
require '/vendor/autoload.php';
\FormSynergy\Session::enable();
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 = '';
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,
]);
Enable local storage to store downloads and responses.
FS::Storage( '/', 'local-storage' );
Load and start managing an account.
$api = FS::Api()->Load($profileid);
Update modid, the unique identifier of the strategy.
\FormSynergy\Localize_Fallback::Run([
'modid' => '',
])