@@ -21,23 +21,25 @@ class IDVAuthenticationService
2121
2222 public static function idvAuthentication (array $ args , $ clientService , $ demoDocsPath , string $ fixingInstructions ): array
2323 {
24- # 1. Create the envelope request object
24+ # Create the envelope request object
2525 $ envelope_definition = IDVAuthenticationService::makeEnvelope (
2626 $ args ["envelope_args " ],
2727 $ clientService ,
2828 $ demoDocsPath ,
2929 $ fixingInstructions
3030 );
3131
32- # 2. call Envelopes::create API method
32+ # Call Envelopes::create API method
3333 # Exceptions will be caught by the calling function
34+ #ds-snippet-start:eSign23Step5
3435 $ envelope_api = $ clientService ->getEnvelopeApi ();
3536 $ envelopeResponse = $ envelope_api ->createEnvelope (
3637 $ args ['account_id ' ],
3738 $ envelope_definition
3839 );
3940
4041 return ['envelope_id ' => $ envelopeResponse ->getEnvelopeId ()];
42+ #ds-snippet-end:eSign23Step5
4143 }
4244
4345 /**
@@ -52,7 +54,7 @@ public static function idvAuthentication(array $args, $clientService, $demoDocsP
5254 public static function makeEnvelope (array $ args , $ clientService , $ demoDocsPath , string $ fixingInstruction ): EnvelopeDefinition
5355 {
5456 # Retrieve the workflow ID
55- # Step 3 start
57+ #ds-snippet- start:eSign23Step3
5658 $ accounts_api = $ clientService ->getAccountsApi ();
5759 $ accounts_response = $ accounts_api ->getAccountIdentityVerification ($ _SESSION ['ds_account_id ' ]);
5860 $ workflows_data = $ accounts_response ->getIdentityVerification ();
@@ -62,7 +64,7 @@ public static function makeEnvelope(array $args, $clientService, $demoDocsPath,
6264 $ workflow_id = $ workflow ['workflow_id ' ];
6365 }
6466 }
65- # Step 3 end
67+ #ds-snippet- end:eSign23Step3
6668
6769 if ($ workflow_id == '' ) {
6870 throw new ApiException ($ fixingInstruction );
@@ -71,7 +73,7 @@ public static function makeEnvelope(array $args, $clientService, $demoDocsPath,
7173 $ envelopeAndSigner = RecipientAuthenticationService::constructAnEnvelope (
7274 $ demoDocsPath
7375 );
74- # Step 4 start
76+ #ds-snippet- start:eSign23Step4
7577 $ envelope_definition = $ envelopeAndSigner ['envelopeDefinition ' ];
7678 $ signer1Tabs = $ envelopeAndSigner ['signerTabs ' ];
7779
@@ -95,7 +97,7 @@ public static function makeEnvelope(array $args, $clientService, $demoDocsPath,
9597 $ recipients = new Recipients ();
9698 $ recipients ->setSigners (array ($ signer1 ));
9799 $ envelope_definition ->setRecipients ($ recipients );
98- # Step 4 end
100+ #ds-snippet- end:eSign23Step4
99101
100102 return $ envelope_definition ;
101103 }
0 commit comments