Skip to content

Commit

Permalink
Merge pull request #4200 from nickmango/bug/doc-webhook-update
Browse files Browse the repository at this point in the history
Bug/Docusign Webhook Signature Update
  • Loading branch information
nickmango authored Nov 30, 2023
2 parents f3fe93d + a747231 commit 99dc361
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,16 +399,15 @@ func (s *service) SignedIndividualCallbackGithub(ctx context.Context, payload []

if status == "Completed" {
log.WithFields(f).Debugf("envelope signed - status: %s", status)
itemSignature := signatures.ItemSignature{
SignatureID: signatureID,
DateModified: currentTime,
SignatureSigned: true,
UserDocusignRawXML: string(payload),
UserDocusignName: fullName,
UserDocusignDateSigned: signedDate,
}

err := s.signatureService.SaveOrUpdateSignature(ctx, &itemSignature)
updates := map[string]interface{}{
"signature_signed": true,
"date_modified": currentTime,
"signed_on": currentTime,
"user_docusign_raw_xml": string(payload),
"user_docusign_name": fullName,
"user_docusign_date_signed": signedDate,
}
err = s.signatureService.UpdateSignature(ctx, signatureID, updates)
if err != nil {
log.WithFields(f).WithError(err).Warnf("unable to update signature record with envelope ID: %s", envelopeID)
return err
Expand Down

0 comments on commit 99dc361

Please sign in to comment.