Skip to content

Commit

Permalink
UI updates as well as updating latest Maestro SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
InbarGazit committed Jun 21, 2024
1 parent 066393d commit 591f186
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 71 deletions.
95 changes: 48 additions & 47 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed public/assets/banner-code.png
Binary file not shown.
Binary file added public/assets/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/Controllers/Examples/Admin/EG012CloneAccount.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Example\Controllers\Examples\Admin;
namespace DocuSign\Controllers\Examples\Admin;

use DocuSign\Admin\Client\ApiException;
use Example\Controllers\AdminApiBaseController;
use Example\Services\Examples\Admin\CloneAccountService;
use DocuSign\Controllers\AdminApiBaseController;
use DocuSign\Services\Examples\Admin\CloneAccountService;

class EG012CloneAccount extends AdminApiBaseController
{
Expand Down
4 changes: 3 additions & 1 deletion src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@ public function createController(): void
$this->args['envelope_args']['cc_name'],
$this->args['envelope_args']['cc_email'],
$mtid,
$mtsec
$mtsec,
$workflowId
);
$_SESSION['instance_id'] = $trigger->getInstanceId();
} catch (ApiException $e) {
if ($e->getCode() == 403) {
$this->contactSupportToEnableFeature($e);
}
}

$this->clientService->showDoneTemplateFromManifest(
$this->codeExampleText,
json_encode($trigger->__toString())
Expand Down
13 changes: 13 additions & 0 deletions src/Controllers/Examples/eSignature/EG020PhoneAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ public function createController(): void
$this->checkDsToken();

try {
if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
$GLOBALS['twig']->display(
'error.html',
[
'error_code' => "400",
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
'common_texts' => ManifestService::getCommonTexts()
]
);

exit;
}

$envelopeAuthentification = PhoneAuthenticationService::phoneAuthentication(
$this->args,
$this::DEMO_DOCS_PATH,
Expand Down
13 changes: 13 additions & 0 deletions src/Controllers/Examples/eSignature/EG022KbAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ public function createController(): void
# Obtain your OAuth Token
$this->checkDsToken();

if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
$GLOBALS['twig']->display(
'error.html',
[
'error_code' => "400",
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
'common_texts' => ManifestService::getCommonTexts()
]
);

exit;
}

$envelopeAuthentification = KbAuthenticationService::kbAuthentification(
$this->args,
$this->clientService,
Expand Down
13 changes: 13 additions & 0 deletions src/Controllers/Examples/eSignature/EG023IDVAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ public function createController(): void
$this->checkDsToken();

try {
if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
$GLOBALS['twig']->display(
'error.html',
[
'error_code' => "400",
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
'common_texts' => ManifestService::getCommonTexts()
]
);

exit;
}

$envelopeAuthentification = IDVAuthenticationService::idvAuthentication(
$this->args,
$this->clientService,
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Examples/Admin/CloneAccountService.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Example\Services\Examples\Admin;
namespace DocuSign\Services\Examples\Admin;

use DocuSign\Admin\Api\ProvisionAssetGroupApi;
use DocuSign\Admin\Api\ProvisionAssetGroupApi\GetAssetGroupAccountsOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public static function triggerWorkflow(
string $ccName,
string $ccEmail,
string $mtid,
string $mtsec
string $mtsec,
string $workflowId
): TriggerWorkflowViaPostResponse {
#ds-snippet-start:Maestro1Step4
$triggerPayload = new TriggerPayload();
Expand All @@ -98,7 +99,7 @@ public static function triggerWorkflow(
#ds-snippet-end:Maestro1Step4

#ds-snippet-start:Maestro1Step5
return $workflowTriggerApi->triggerWorkflow($accountId, $triggerPayload, $triggerOptions);
return $workflowTriggerApi->triggerWorkflow($accountId, $workflowId, $triggerPayload, $triggerOptions);
#ds-snippet-end:Maestro1Step5
}

Expand Down
Loading

0 comments on commit 591f186

Please sign in to comment.