signnow / SignNow.NET

SignNow.Net is the official .NET 4.5+ and .NET Standard class library for the SignNow API. SignNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts.
https://www.signnow.com/developers
MIT License
16 stars 12 forks source link

How to redirect after creating an embedded link #159

Closed edencorbin closed 3 months ago

edencorbin commented 4 months ago

I am embedding sign now and upon signing would like to essentially reload the page, or redirect to the same page would be fine, or in some way notify my parent application that the process is done, how do I go about that, I use this currently:

    CreateEmbeddedSigningInviteToSignTheDocument(SignNowDocument document, string email, SignNowContext signNowContext)
        {
            // create embedded signing invite
            var invite = new EmbeddedSigningInvite(document);

            invite.AddEmbeddedSigningInvite(
                new EmbeddedInvite
                {
                    Email = email,
                    RoleId = document.Roles[0].Id,
                    SigningOrder = 1
                });

            return await signNowContext.Invites.CreateInviteAsync(document.Id, invite)
                .ConfigureAwait(false);
        }

and then

        public static async Task<EmbeddedInviteResponse>
    CreateEmbeddedSigningInviteToSignTheDocument(SignNowDocument document, string email, SignNowContext signNowContext)
        {
            // create embedded signing invite
            var invite = new EmbeddedSigningInvite(document);

            invite.AddEmbeddedSigningInvite(
                new EmbeddedInvite
                {
                    Email = email,
                    RoleId = document.Roles[0].Id,
                    SigningOrder = 1
                });

            return await signNowContext.Invites.CreateInviteAsync(document.Id, invite)
                .ConfigureAwait(false);
        }
AlexNDRmac commented 4 months ago

When you created Invite - you'll get Invite state as a details (like id, email, roleId...) in the response. There is nothing about web pages or links. So, you can easily to remember any of desired links/locations with your own classes/model or even simple variable, then - perform any calls to create Invites and redirect your users where you want to. This SDK does not combine any of complex actions, like creating something and redirecting to anywhere. All the actions/features - just a single actions which allows you to create any of complex actions.