Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

TemplateSignatureRequest::setSigner() and AbstractSignatureRequest::addSigner() have different parameters #118

@coryrose1

Description

@coryrose1

We are having issues with a "This request cannot be signed yet" error response when attempting to retrieve a signature URL from the client.

We are using TemplateSignatureRequest to create a request with a template to sign for multiple signers

According to the documentation, this occurs when attempting to retrieve the sign URL when:

  • the request has already been signed
  • or, in the case of ordered signing, a prior signer has not signed it yet

Since the signature in question has not yet been signed, we are wondering if the differing parameters for these methods are causing the SignatureRequest to be an "ordered signing", and thus Signer 2 cannot sign prior to Signer 1 signing.

We are only passing a $role, $email, and $name to setSigner() but is it possible that the $name is then being used as $index in the parent AbstractSignatureRequest::addSigner()

TemplateSignatureRequest::setSigner()

/**
     * Set the signer to the list of signers for this request
     *
     * @param  string $role
     * @param  mixed $email_or_signer
     * @param  string $name
     * @return TemplateSignatureRequest
     * @see    AbstractSignatureRequest::addSigner()
     */
    public function setSigner($role, $email_or_signer, $name = null)
    {
        return parent::addSigner($email_or_signer, $name, $role);
    }

AbstractSignatureRequest::addSigner()

/**
     * Adds a signer to the signature request
     *
     * @param  mixed $email_or_signer
     * @param  string $name
     * @param  string $index
     * @return AbstractSignatureRequest
     */
    public function addSigner($email_or_signer, $name = null, $index = null)
    {
        $signer = ($email_or_signer instanceof Signer)
            ? $email_or_signer
            : new Signer(array(
                'name' => $name,
                'email_address' => $email_or_signer
            ));

        if (isset($index)) {
            $this->signers[$index] = $signer;
        } else {
            $this->signers[] = $signer;
        }

        return $this;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacyRelated to legacy, non-OpenAPI SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions