Пример #1
0
 }
 //Set base path
 $signatureApi->setBasePath($basePath);
 if (empty($callbackUrl)) {
     $callbackUrl = "";
 }
 //Set variables for template
 F3::set("callbackUrl", $callbackUrl);
 //Create WebHook object
 $webHook = new WebhookInfo();
 //Set callbackUrl url of webhook which will be triggered when form is signed.
 $webHook->callbackUrl = $callbackUrl;
 if (!empty($formGuid)) {
     F3::set("formGuid", $formGuid);
     try {
         $postForm = $signatureApi->PublishSignatureForm($clientId, $formGuid, $webHook);
         //Check status
         if ($postForm->status == "Ok") {
             $result = "Form is published successfully";
             F3::set("message", $result);
             //Generate iframe url
             if ($basePath == "https://api.groupdocs.com/v2.0") {
                 $iframe = 'https://apps.groupdocs.com/signature2/forms/signembed/' . $formGuid;
                 //iframe to dev server
             } elseif ($basePath == "https://dev-api.groupdocs.com/v2.0") {
                 $iframe = 'https://dev-apps.groupdocs.com/signature2/forms/signembed/' . $formGuid;
                 //iframe to test server
             } elseif ($basePath == "https://stage-api-groupdocs.dynabic.com/v2.0") {
                 $iframe = 'https://stage-apps-groupdocs.dynabic.com/signature2/forms/signembed/' . $formGuid;
             } elseif ($basePath == "http://realtime-api.groupdocs.com") {
                 $iframe = 'https://relatime-apps.groupdocs.com/signature2/forms/signembed/' . $formGuid;