@@ -10,24 +10,25 @@ class KbAuthenticationService
1010{
1111 /**
1212 * Do the work of the example
13- * 1. Get the envelope's data
13+ * Get the envelope's data
1414 *
1515 * @param $args array
1616 * @param $clientService
1717 * @return array ['envelope_id']
1818 */
19- # ***DS.snippet.0.start
2019 public static function kbAuthentification (array $ args , $ clientService , $ demoDocsPath ): array
2120 {
22- # 1. Create the envelope request object
21+ # Create the envelope request object
2322 $ envelope_definition = KbAuthenticationService::make_envelope ($ args ["envelope_args " ], $ demoDocsPath );
2423
25- # 2. call Envelopes::create API method
24+ # Call Envelopes::create API method
2625 # Exceptions will be caught by the calling function
26+ #ds-snippet-start:eSign22Step4
2727 $ envelope_api = $ clientService ->getEnvelopeApi ();
2828 $ envelopeResponse = $ envelope_api ->createEnvelope ($ args ['account_id ' ], $ envelope_definition );
2929
3030 return ['envelope_id ' => $ envelopeResponse ->getEnvelopeId ()];
31+ #ds-snippet-end:eSign22Step4
3132 }
3233
3334 /**
@@ -38,7 +39,8 @@ public static function kbAuthentification(array $args, $clientService, $demoDocs
3839 * @param $args array
3940 * @return mixed -- returns an envelope definition
4041 */
41- public static function make_envelope (array $ args , $ demoDocsPath ): EnvelopeDefinition
42+ #ds-snippet-start:eSign22Step3
43+ public static function make_envelope (array $ args , $ demoDocsPath ): EnvelopeDefinition
4244 {
4345 $ envelopeAndSigner = RecipientAuthenticationService::constructAnEnvelope ($ demoDocsPath );
4446 $ envelope_definition = $ envelopeAndSigner ['envelopeDefinition ' ];
@@ -62,5 +64,5 @@ public static function make_envelope(array $args, $demoDocsPath): EnvelopeDefini
6264
6365 return $ envelope_definition ;
6466 }
65- # ***DS. snippet.0. end
67+ #ds- snippet- end:eSign22Step3
6668}
0 commit comments