Ryan_Coleman

Issue while changing Notary on package

0 votes

Duo,

Has anything changed with the process of changing the notary on a package? We are now not able to change the Notary at all on any of our Notary packages. Also, just fyi, this happens when trying to use a notary that is within the senders account.

 

Let me know.  :)


Reply to: Issue while changing Notary on package

0 votes

Duo -

Just doing some initial research, I am getting this error message when trying to add a document that needs to be notarized.

MessageKey:                error.validation.field.notaryFieldAddedToNonNotaryApproval
Error Message:            Notary fields can only be associated with signature assigned to notary role.

Again, we've changed nothing in the past few years and this is now, all of a sudden, not working.  I've looked at the package data we are sending the the follow api call and everything looks normal like it always  does.
 

POST
/packages/{packageId}/documents


Reply to: Issue while changing Notary on package

0 votes

Hi Ryan,

 

Thanks for your post! After some investigation, this validation was not added recently, therefore it could be a different one than the other issue. From the error message, it sounds like when uploading document, your application hasn't specified the package level notary role id? Below is a working code example in .NET sdk + .NET Rest code, following these steps to create a notarized signing transaction:
(1)create an in-person notarized signing transaction

(2)specify package level notary role id - SDK doesn't support this function, so I implemented it in RESTful code

(3)add a document which contains signer signature fields and notary signature fields

(4)send the transaction

 

        public static void Main(string[] args)
       {
           string API_KEY = "your_api_key";
           string API_URL = "https://sandbox.esignlive.com/api";

           string notaryEmail = "notary_email";
           string signerEmail = "signer_email";

           OssClient ossClient = new OssClient(API_KEY, API_URL);

 

//step1

           DocumentPackage pkg1 = PackageBuilder.NewPackageNamed("Create Notary Package by .NET SDK - " + System.DateTime.Now)
                                                              .WithSigner(SignerBuilder.NewSignerWithEmail(notaryEmail)
                                                                      .WithFirstName("Duo")
                                                                      .WithLastName("Liang")
                                                                      .WithCustomId("Notary")
                                                                      )
                                                              .WithSigner(SignerBuilder.NewSignerWithEmail(signerEmail)
                                                                      .WithFirstName("Marry")
                                                                      .WithLastName("Doe")
                                                                      .WithCustomId("applicant")
                                                                      )
                                                              .WithNotarized(true)
                                                              .Build();

           PackageId createPackageOneStep = ossClient.CreatePackageOneStep(pkg1);
           Debug.WriteLine("package id: " + createPackageOneStep);

 

//step2

           setNotaryRoleId(createPackageOneStep.Id, notaryRoleId, API_KEY, API_URL);

 

//step3


           DocumentBuilder db = DocumentBuilder.NewDocumentNamed("document 1")
                   .FromFile("path_to_file")
                   .WithId("document1")
                   .WithSignature(SignatureBuilder.SignatureFor(signerEmail).AtPosition(100, 100)
                       .WithField(FieldBuilder.SignatureDate().AtPosition(100, 200)))
                   .WithSignature(SignatureBuilder.SignatureFor(notaryEmail).AtPosition(400, 100)
                       .WithField(FieldBuilder.CustomField("NotaryLicenseExpiryDate").WithStyle(FieldStyle.UNBOUND_CUSTOM_FIELD).AtPosition(400, 200))
                       .WithField(FieldBuilder.CustomField("NotaryName").WithStyle(FieldStyle.SEAL).AtPosition(400, 300))
                       );


           ossClient.UploadDocument(db.Build(), createPackageOneStep);

 

//step4

           ossClient.SendPackage(createPackageOneStep);

       }


       private static void setNotaryRoleId(String packageId, String notaryId, String API_KEY, String API_URL)
       {
           HttpClient httpClient = new HttpClient();
           httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", API_KEY);
           httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
           string updatePackageString = "{\"notaryRoleId\" : \"" + notaryId + "\"}";
           StringContent jsonUpdatePackageContent = new StringContent(updatePackageString, Encoding.UTF8, "application/json");

           var response = httpClient.PutAsync(new Uri(API_URL) + "/packages/" + packageId, jsonUpdatePackageContent).Result;
           if (!response.IsSuccessStatusCode)
           {
               throw new Exception(response.Content.ReadAsStringAsync().Result);
           }
       }

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue while changing Notary on package

0 votes

Duo,

Is this the process for creating a transaction with a notary? I'm talking about changing the notary on a transaction that already has a notary. We've been using the same steps for years and now it isn't working.


Reply to: Issue while changing Notary on package

0 votes

Hi Ryan,

 

Yes, this is a regular process to create an in-person notarization transaction from scratch.  Could you remind of the steps or the relavant code of how you are switching the notary on a transaction and how you are adding the notarized document & fields?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue while changing Notary on package

0 votes

Duo,

Here is the process that we've been using to change the notary. I remember we had to do these exact steps as removing the notary and then adding a notary caused an issue where it wouldn't add the notary if there were no notary signatures on the documents.

 

Set package in draft mode

Remove all Notary documents from package

Remove notary id from package and set to not notarized

Add notary signer to package as signer

Add back notarized document with new notary signer id in the approvals

Set package notaryid and set the package back to notarized

Do document visibility if needed

Set package back to sent status.

 


Reply to: Issue while changing Notary on package

0 votes

Hi Ryan,

 

For your steps:

1. Set package in draft mode

2. Remove all Notary documents from package

3. Remove notary id from package and set to not notarized

4. Add notary signer to package as signer

5. Add back notarized document with new notary signer id in the approvals

6. Set package notaryid and set the package back to notarized

7. Do document visibility if needed

8. Set package back to sent status.

As per the error message, it's suggesting if it's possible to switch the order of step 5 and 6, where to set package notaryid first then upload the document with notary fields.

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue while changing Notary on package

1 votes

Duo,

I had tried that before and for some reason, it didn't work. I guess I was missing a step in there when manually testing. I hard-coded the steps to work this way and now it is back working. Thanks for the second set of eyes!


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off