form-synergy/custom-module

此模板将创建单个模块,此示例将包括所有选项和功能。非常好的示例。

dev-master 2019-04-07 11:30 UTC

This package is auto-updated.

Last update: 2022-01-07 18:02:18 UTC


README

此模板将创建单个模块,此示例将包括所有选项和功能。非常好的示例。

使用 composer 安装

composer require form-synergy/custom-module

包含库

require '/vendor/autoload.php';

启用会话管理

\FormSynergy\Session::enable();

导入 Form Synergy 类

use \FormSynergy\Fs as FS;

您需要在 Form Synergy 控制台中检索您的凭证。

控制台访问:https://formsynergy.com/console/

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

如果您是经销商

  • $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,
]);

本地存储

启用本地存储以存储下载和响应。

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

加载账户

加载并开始管理账户。

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

运行脚本

使用适当的信息更新空值。

\FormSynergy\Custom_Module::Run([
    'siteid' => '',
    'modid' => '',

    /*
     * To experience module connections, 
     * Please visit the playground page: https://formsynergy.com/playground/
     * 
     * NOTE: We are connecting this module
     * by providing the module id of the
     * next module to display.
     * 
     */ 
    'onsubmit' => '' 
])