Skip to content

Commit d41461e

Browse files
committed
fixed merge conflicts
2 parents dbf4992 + ae00268 commit d41461e

File tree

3 files changed

+78
-15
lines changed

3 files changed

+78
-15
lines changed

launcher-csharp/eSignature/Examples/CFRPart11EmbeddedSending.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,15 @@ public static bool IsCfrPart11Account(string accessToken, string basePath, strin
5151
public static string EmbeddedSigning(string signerEmail, string signerName, string accessToken, string basePath, string accountId, string countryAreaCode, string phoneNumber, string docPdf, string redirectUrl)
5252
{
5353
// Construct your API headers
54-
// Step 2 start
54+
//ds-snippet-start:eSign41Step2
5555
var docuSignClient = new DocuSignClient(basePath);
5656
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
5757

58-
// Step 2 end
59-
60-
// Step 3 start
6158
var accountsApi = new AccountsApi(docuSignClient);
6259
AccountIdentityVerificationResponse response = accountsApi.GetAccountIdentityVerification(accountId);
6360
var phoneAuthWorkflow = response.IdentityVerification.FirstOrDefault(x => x.DefaultName == "SMS for access & signatures");
61+
//ds-snippet-end:eSign41Step2
6462

65-
// Step 3 end
6663
if (phoneAuthWorkflow == null)
6764
{
6865
throw new ApiException(0, "IDENTITY_WORKFLOW_INVALID_ID");
@@ -71,7 +68,7 @@ public static string EmbeddedSigning(string signerEmail, string signerName, stri
7168
string workflowId = phoneAuthWorkflow.WorkflowId;
7269

7370
// Construct your envelope JSON body
74-
// Step 4 start
71+
//ds-snippet-start:eSign41Step3
7572
EnvelopeDefinition env = new EnvelopeDefinition()
7673
{
7774
EnvelopeIdStamping = "true",
@@ -144,23 +141,27 @@ public static string EmbeddedSigning(string signerEmail, string signerName, stri
144141
Recipients recipients = new Recipients();
145142
recipients.Signers = new List<Signer> { signer1 };
146143
env.Recipients = recipients;
147-
148-
// Step 4 end
144+
//ds-snippet-end:eSign41Step3
149145

150146
// Call the eSignature REST API
151-
// Step 5 start
147+
//ds-snippet-start:eSign41Step4
152148
EnvelopesApi envelopesApi = new EnvelopesApi(docuSignClient);
153149
EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, env);
150+
//ds-snippet-end:eSign41Step4
154151

155-
// Step 5 end
156-
RecipientViewRequest viewRequest = MakeRecipientViewRequest(signerEmail, signerName, redirectUrl, ClientUserId);
152+
//ds-snippet-start:eSign41Step5
153+
RecipientViewRequest viewRequest = MakeRecipientViewRequest(signerEmail, signerName, redirectUrl, _clientUserId);
154+
//ds-snippet-end:eSign41Step5
157155

158156
// call the CreateRecipientView API
157+
//ds-snippet-start:eSign41Step6
159158
ViewUrl results1 = envelopesApi.CreateRecipientView(accountId, results.EnvelopeId, viewRequest);
159+
//ds-snippet-end:eSign41Step6
160160

161161
return results1.Url;
162162
}
163163

164+
//ds-snippet-start:eSign41Step5
164165
private static RecipientViewRequest MakeRecipientViewRequest(string signerEmail, string signerName, string returnUrl, string signerClientId, string pingUrl = null)
165166
{
166167
// Data for this method
@@ -206,5 +207,6 @@ private static RecipientViewRequest MakeRecipientViewRequest(string signerEmail,
206207

207208
return viewRequest;
208209
}
210+
//ds-snippet-end:eSign41Step5
209211
}
210212
}

launcher-csharp/eSignature/Examples/ResponsiveSigning.cs

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,66 @@ private static EnvelopeDefinition MakeEnvelope(
7575
string ccName,
7676
string signerClientId)
7777
{
78+
int price1 = 5;
79+
int price2 = 150;
80+
81+
FormulaTab formulaTab1 = new FormulaTab
82+
{
83+
Font = "helvetica",
84+
FontSize = "size11",
85+
FontColor = "black",
86+
AnchorString = "/l1e/",
87+
AnchorYOffset = "-8",
88+
AnchorUnits = "pixels",
89+
AnchorXOffset = "105",
90+
TabLabel = "l1e",
91+
Formula = $"[l1q] * {price1}",
92+
RoundDecimalPlaces = "0",
93+
Required = "true",
94+
Locked = "true",
95+
DisableAutoSize = "false",
96+
};
97+
98+
FormulaTab formulaTab2 = new FormulaTab
99+
{
100+
Font = "helvetica",
101+
FontSize = "size11",
102+
FontColor = "black",
103+
AnchorString = "/l2e/",
104+
AnchorYOffset = "-8",
105+
AnchorUnits = "pixels",
106+
AnchorXOffset = "105",
107+
TabLabel = "l2e",
108+
Formula = $"[l2q] * {price2}",
109+
RoundDecimalPlaces = "0",
110+
Required = "true",
111+
Locked = "true",
112+
DisableAutoSize = "false",
113+
};
114+
115+
FormulaTab formulaTab3 = new FormulaTab
116+
{
117+
Font = "helvetica",
118+
FontSize = "size11",
119+
FontColor = "black",
120+
AnchorString = "/l3t/",
121+
AnchorYOffset = "-8",
122+
AnchorUnits = "pixels",
123+
AnchorXOffset = "105",
124+
TabLabel = "l3t",
125+
Formula = "[l1e] + [l2e]",
126+
RoundDecimalPlaces = "0",
127+
Required = "true",
128+
Locked = "true",
129+
DisableAutoSize = "false",
130+
Bold = "true",
131+
};
132+
133+
Tabs tabs = new Tabs
134+
{
135+
FormulaTabs = new List<FormulaTab> { formulaTab1, formulaTab2, formulaTab3 },
136+
};
137+
78138
Signer signer = new Signer
79139
{
80140
Email = signerEmail,
@@ -83,6 +143,7 @@ private static EnvelopeDefinition MakeEnvelope(
83143
RecipientId = "1",
84144
RoutingOrder = "1",
85145
RoleName = "Signer",
146+
Tabs = tabs,
86147
};
87148

88149
CarbonCopy cc = new CarbonCopy
@@ -100,8 +161,8 @@ private static EnvelopeDefinition MakeEnvelope(
100161
.Replace("{ccName}", ccName)
101162
.Replace("{ccEmail}", ccEmail)
102163
.Replace("/sn1/", "<ds-signature data-ds-role=\"Signer\"/>")
103-
.Replace("/l1q/", " <input data-ds-type=\"number\"/>")
104-
.Replace("/l2q/", " <input data-ds-type=\"number\"/>");
164+
.Replace("/l1q/", " <input data-ds-type=\"number\" name=\"l1q\"/>")
165+
.Replace("/l2q/", " <input data-ds-type=\"number\" name=\"l2q\"/>");
105166

106167
return new EnvelopeDefinition()
107168
{

launcher-csharp/order_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h4>Ordered by {signerName}</h4>
3333
<tr>
3434
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">Harmonica</td>
3535
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
36-
<span style="color:white;">/l1q/</span>
36+
<span style="color:black;">/l1q/</span>
3737
</td>
3838
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">$5</td>
3939
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
@@ -43,7 +43,7 @@ <h4>Ordered by {signerName}</h4>
4343
<tr>
4444
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">Xylophone</td>
4545
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
46-
<span style="color:white;">/l2q/</span>
46+
<span style="color:black;">/l2q/</span>
4747
</td>
4848
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">$150</td>
4949
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">

0 commit comments

Comments
 (0)