Sahana

SDK code for creating Notary transactions and adding Notary related fields.

0 votes
Hi Team, Could you please help us in getting the .NET SDK code to create a Notary enabled transaction and adding the associated fields like Notary seal, Notary expiry and other Notary-related fields. This request is from Otis-Elevator. Let me know if you have any questions. Thanks.

Reply to: SDK code for creating Notary transactions and adding Notary related fields.

0 votes
The attachment is a working example I created for you, using .NET SDK and REST method(for second step). Simply adjust to your own info, and do remember to modify the notary field name if your setup in account was different from my test account. Regarding how to add notary fields, Here's a example of how notary regular and seal fields look like in JSON:
{
              "binding": null,
              "validation": null,
              "id": "cggVvdrOuhAO",
              "page": 0,
              "subtype": "CUSTOMFIELD",
              "extract": false,
              "width": 165,
              "height": 37,
              "formattedValue": "",
              "left": 315,
              "top": 310,
              "extractAnchor": null,
              "data": null,
              "type": "INPUT",
              "value": null,
              "name": "NotaryLicenseExpiryDate"
            },
            {
              "binding": null,
              "validation": null,
              "id": "CYJyVpplmcg7",
              "page": 0,
              "subtype": "SEAL",
              "extract": false,
              "width": 165,
              "height": 37,
              "formattedValue": "",
              "left": 315,
              "top": 404,
              "extractAnchor": null,
              "data": null,
              "type": "INPUT",
              "value": null,
              "name": "NotaryName"
            }
REGULAR notary field has a type of "INPUT", subtype of "CUSTOMFIELD" and use name to identify which field to choose SEAL notary field has a type of "INPUT", subtype of "SEAL" and use name to identify which field to choose So an equivalent .Net code can be:
                Signature notarySignature = 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)
                          )
                         .Build();
                eslClient.ApprovalService.AddApproval(eslClient.GetPackage(createPackageOneStep), notaryDocumentId, notarySignature);
Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments

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