Account
Earned badges
Achievement: Latest Unlocked
Approved Answers
Replies
Topics Started
Preferences
Topic Started
Replies Created
Reply to: Allowing signer to upload a signature through apex sdk
Monday, November 14, 2022 at 01:31pmReply to: Allowing signer to upload a signature through apex sdk
Tuesday, November 15, 2022 at 04:56pmHI Dua, it does not work. This is what i tried.
Even after updating the package and setting fromFile=true. it does not update on package.
pkg = sdk.getPackage(packageId);
for(OneSpanAPIObjects.Document doc : pkg.documents){
for(OneSpanAPIObjects.Approval aprvl : doc.approvals){
if(fileSignerRoleId==aprvl.role) aprvl.fromFile=true;
}
}
sdk.updatePackage(pkg, packageId);
Reply to: Allowing signer to upload a signature through apex sdk
Wednesday, November 16, 2022 at 09:30amHi Duo,
I tried that too yesterday, it gives an internal error. Here is the code.
pkg = sdk.getPackage(packageId);
for(OneSpanAPIObjects.Document doc : pkg.documents){
for(OneSpanAPIObjects.Approval aprvl : doc.approvals){
if(fileSignerRoleId==aprvl.role) {
aprvl.fromFile=true;
sdk.updateApproval(packageId, doc.Id, aprvl.id, aprvl);
}
}
}
Package ID: 7DnYwrl91MyzxyFQo--RbngRLNs=
User: [email protected]
Reply to: Allowing signer to upload a signature through apex sdk
Wednesday, November 16, 2022 at 09:52amAgain Error is thrown even after making it as draft.
OneSpanRESTAPIHelper.OneSpanRestAPIHelperException: Error creating OneSpan signer: 500 - Internal Server Error - {"messageKey":"error.internal.default","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}
I cannot create a new package with fromFile=true. Reason being, we add our tags to the document itself and send for package generation. Tags do not have any attribute to mark it from file.
{{esl:Signer1:Capture:Size(120,30)}}
Let me know what can be done in this case.
Reply to: Allowing signer to upload a signature through apex sdk
Friday, November 18, 2022 at 03:40pmI was able to update it using below code.
pkg = sdk.getPackage(packageId);
for(OneSpanAPIObjects.Document doc : pkg.documents){
if((String.valueOf(fileId)).equalsIgnoreCase(doc.id)){
//fileid is the document you used to generate the onespan package.
//if you try changing it for default-consent document, it will give error
for(OneSpanAPIObjects.Approval aprvl : doc.approvals){
if(signerRoleId==aprvl.role) {
aprvl.fromFile=true;
sdk.updateApproval(packageId, doc.Id, aprvl.id, aprvl);
}
}
}
}
Hi Duo,
Appreciate your response, but the link you shared is to add documents to transaction.
I am asking to add a configuration so we allow user to upload signature file while signing rather than drawing the signature. How do we do that via code?
On User Interface: you click on signature block and toggle "from file".
Thanks
Akshay