Skip to content

Commit 591f186

Browse files
committed
UI updates as well as updating latest Maestro SDK
1 parent 066393d commit 591f186

15 files changed

+104
-71
lines changed

composer.lock

+48-47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/banner-code.png

-52.3 KB
Binary file not shown.

public/assets/header.png

84.6 KB
Loading

src/Controllers/Examples/Admin/EG012CloneAccount.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Example\Controllers\Examples\Admin;
3+
namespace DocuSign\Controllers\Examples\Admin;
44

55
use DocuSign\Admin\Client\ApiException;
6-
use Example\Controllers\AdminApiBaseController;
7-
use Example\Services\Examples\Admin\CloneAccountService;
6+
use DocuSign\Controllers\AdminApiBaseController;
7+
use DocuSign\Services\Examples\Admin\CloneAccountService;
88

99
class EG012CloneAccount extends AdminApiBaseController
1010
{

src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@ public function createController(): void
123123
$this->args['envelope_args']['cc_name'],
124124
$this->args['envelope_args']['cc_email'],
125125
$mtid,
126-
$mtsec
126+
$mtsec,
127+
$workflowId
127128
);
128129
$_SESSION['instance_id'] = $trigger->getInstanceId();
129130
} catch (ApiException $e) {
130131
if ($e->getCode() == 403) {
131132
$this->contactSupportToEnableFeature($e);
132133
}
133134
}
135+
134136
$this->clientService->showDoneTemplateFromManifest(
135137
$this->codeExampleText,
136138
json_encode($trigger->__toString())

src/Controllers/Examples/eSignature/EG020PhoneAuthentication.php

+13
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ public function createController(): void
3535
$this->checkDsToken();
3636

3737
try {
38+
if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
39+
$GLOBALS['twig']->display(
40+
'error.html',
41+
[
42+
'error_code' => "400",
43+
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
44+
'common_texts' => ManifestService::getCommonTexts()
45+
]
46+
);
47+
48+
exit;
49+
}
50+
3851
$envelopeAuthentification = PhoneAuthenticationService::phoneAuthentication(
3952
$this->args,
4053
$this::DEMO_DOCS_PATH,

src/Controllers/Examples/eSignature/EG022KbAuthentication.php

+13
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ public function createController(): void
3737
# Obtain your OAuth Token
3838
$this->checkDsToken();
3939

40+
if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
41+
$GLOBALS['twig']->display(
42+
'error.html',
43+
[
44+
'error_code' => "400",
45+
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
46+
'common_texts' => ManifestService::getCommonTexts()
47+
]
48+
);
49+
50+
exit;
51+
}
52+
4053
$envelopeAuthentification = KbAuthenticationService::kbAuthentification(
4154
$this->args,
4255
$this->clientService,

src/Controllers/Examples/eSignature/EG023IDVAuthentication.php

+13
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ public function createController(): void
3939
$this->checkDsToken();
4040

4141
try {
42+
if ($this->args['envelope_args']['signer_email'] == $GLOBALS['DS_CONFIG']['signer_email']) {
43+
$GLOBALS['twig']->display(
44+
'error.html',
45+
[
46+
'error_code' => "400",
47+
'error_message' => ManifestService::getCommonTexts()['IdenticalEmailsNotAllowedErrorMessage'],
48+
'common_texts' => ManifestService::getCommonTexts()
49+
]
50+
);
51+
52+
exit;
53+
}
54+
4255
$envelopeAuthentification = IDVAuthenticationService::idvAuthentication(
4356
$this->args,
4457
$this->clientService,

src/Services/Examples/Admin/CloneAccountService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Example\Services\Examples\Admin;
3+
namespace DocuSign\Services\Examples\Admin;
44

55
use DocuSign\Admin\Api\ProvisionAssetGroupApi;
66
use DocuSign\Admin\Api\ProvisionAssetGroupApi\GetAssetGroupAccountsOptions;

src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public static function triggerWorkflow(
7676
string $ccName,
7777
string $ccEmail,
7878
string $mtid,
79-
string $mtsec
79+
string $mtsec,
80+
string $workflowId
8081
): TriggerWorkflowViaPostResponse {
8182
#ds-snippet-start:Maestro1Step4
8283
$triggerPayload = new TriggerPayload();
@@ -98,7 +99,7 @@ public static function triggerWorkflow(
9899
#ds-snippet-end:Maestro1Step4
99100

100101
#ds-snippet-start:Maestro1Step5
101-
return $workflowTriggerApi->triggerWorkflow($accountId, $triggerPayload, $triggerOptions);
102+
return $workflowTriggerApi->triggerWorkflow($accountId, $workflowId, $triggerPayload, $triggerOptions);
102103
#ds-snippet-end:Maestro1Step5
103104
}
104105

0 commit comments

Comments
 (0)