@@ -23,11 +23,12 @@ class SigningViaEmailService
2323 # ***DS.snippet.0.start
2424 public static function signingViaEmail (array $ args , $ clientService , $ demoDocsPath , $ docxFile , $ pdfFile ): array
2525 {
26- # 1. Create the envelope request object
26+ #ds-snippet-start:eSign2Step3
27+ # Create the envelope request object
2728 $ envelope_definition = SigningViaEmailService::make_envelope ($ args ["envelope_args " ], $ clientService , $ demoDocsPath , $ docxFile , $ pdfFile );
2829 $ envelope_api = $ clientService ->getEnvelopeApi ();
2930
30- # 2. call Envelopes::create API method
31+ # Call Envelopes::create API method
3132 # Exceptions will be caught by the calling function
3233 try {
3334 $ envelopeResponse = $ envelope_api ->createEnvelope ($ args ['account_id ' ], $ envelope_definition );
@@ -41,6 +42,7 @@ public static function signingViaEmail(array $args, $clientService, $demoDocsPat
4142 }
4243
4344 return ['envelope_id ' => $ envelopeResponse ->getEnvelopeId ()];
45+ #ds-snippet-end:eSign2Step3
4446 }
4547
4648 /**
@@ -58,7 +60,9 @@ public static function signingViaEmail(array $args, $clientService, $demoDocsPat
5860 * @param $demoDocsPath
5961 * @return EnvelopeDefinition -- returns an envelope definition
6062 */
61- public static function make_envelope (array $ args , $ clientService , $ demoDocsPath , $ docxFile , $ pdfFile ): EnvelopeDefinition
63+
64+ #ds-snippet-start:eSign2Step2
65+ public static function make_envelope (array $ args , $ clientService , $ demoDocsPath , $ docxFile , $ pdfFile ): EnvelopeDefinition
6266 {
6367 # document 1 (html) has sign here anchor tag **signature_1**
6468 # document 2 (docx) has sign here anchor tag /sn1/
@@ -119,5 +123,5 @@ public static function make_envelope(array $args, $clientService, $demoDocsPath,
119123
120124 return SMSDeliveryService::addSignersToTheDelivery ($ signer1 , $ cc1 , $ envelope_definition , $ args );
121125 }
122- # ***DS. snippet.0. end
126+ #ds- snippet- end:eSign2Step2
123127}
0 commit comments