$sign = array(
"firstname" => $sign->firstname,
"lastname" => $sign->lastname,
);
$this->users($sign);
and in the function users i do that :
public function users($sign)
{
$this->args = $this->getTemplateArgs();
$args = $this->args;
$envelope_args = $args["envelope_args"];
# Create the envelope request object
$envelope_definition = $this >makeEnvelopeFileObject($args["envelope_args"]);
$envelope_id = $results->getEnvelopeId();
# Create the Recipient View request object
$authentication_method = 'None'; # How is this application authenticating
# the signer? See the `authenticationMethod' definition
# https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
$recipient_view_request = new \DocuSign\eSign\Model\RecipientViewRequest([
'authentication_method' => $authentication_method,
'client_user_id' => '1000',
'recipient_id' => '1',
'return_url' => $envelope_args['ds_return_url'],
'user_name' => $sign['firstname'],
]);
$result_test = $envelopeApi->getEnvelope($accountInfo[0]->getAccountId(), $args['envelope_ids']);
$url = $results['url'];
$json['data'] = $url;
return Response::success(200, 'ok', $json);
}
but then a got the error "Cannot access offset of type string on string i don't know how to resolve this issue the error is on this line 'user_name' => $sign['firstname']
thanks for your help in advance