@@ -37,25 +37,28 @@ public static function setTemplateTabValues(array $args, $clientService): array
3737
3838 public static function sendEnvelopeFromCreatedTemplate ($ clientService , $ args , $ envelope_definition ): array
3939 {
40- # 2. call Envelopes::create API method
40+ # Step 4 start
41+ # Call Envelopes::create API method
4142 # Exceptions will be caught by the calling function
4243 $ envelope_api = $ clientService ->getEnvelopeApi ();
4344 $ envelopeResponse = $ envelope_api ->createEnvelope ($ args ['account_id ' ], $ envelope_definition );
4445 $ envelope_id = $ envelopeResponse ->getEnvelopeId ();
45-
46- # 3. Create the Recipient View request object
47- $ authentication_method = 'None ' ; # How is this application authenticating
48- # the signer? See the `authentication_method' definition
49- # https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
50- $ recipient_view_request = $ clientService ->getRecipientViewRequest (
51- $ authentication_method ,
52- $ args ["envelope_args " ]
53- );
54-
55- # 4. Obtain the recipient_view_url for the embedded signing
56- # Exceptions will be caught by the calling function
57- $ recipientView = $ clientService ->getRecipientView ($ args ['account_id ' ], $ envelope_id , $ recipient_view_request );
58-
46+ # Step 4 end
47+
48+ # Step 5 start
49+ # Create the Recipient View request object
50+ $ authentication_method = 'None ' ; # How is this application authenticating
51+ # the signer? See the `authentication_method' definition
52+ # https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
53+ $ recipient_view_request = $ clientService ->getRecipientViewRequest (
54+ $ authentication_method ,
55+ $ args ["envelope_args " ]
56+ );
57+
58+ # Obtain the recipient_view_url for the embedded signing
59+ # Exceptions will be caught by the calling function
60+ $ recipientView = $ clientService ->getRecipientView ($ args ['account_id ' ], $ envelope_id , $ recipient_view_request );
61+ # Step 5 end
5962 return ['envelope_id ' => $ envelope_id , 'redirect_url ' => $ recipientView ['url ' ]];
6063 }
6164
0 commit comments