Skip to content

Instantly share code, notes, and snippets.

@Ergin008
Ergin008 / soap_create_envelope.php
Created February 12, 2018 21:55
SOAP Create Envelope (PHP)
// Create the recipient
$rcp1 = new Recipient();// First recipient to put in recipient array
$rcp1->UserName = "John Doe";
$rcp1->Email = $Recipient1Email;
$rcp1->Type = RecipientTypeCode::Signer;
$rcp1->ID = "1";
$rcp1->RoutingOrder = 1;
$rcp1->RequireIDLookup = FALSE;
// Specify captive info to embed the recipient
@Ergin008
Ergin008 / soap_embedded_signing.cs
Created February 12, 2018 22:07
SOAP Embedded Signing (C#)
// Construct the recipient token authentication assertion
// Specify ID, start time, method and domain
DocuSignWeb.RequestRecipientTokenAuthenticationAssertion assertion
= new DocuSignWeb.RequestRecipientTokenAuthenticationAssertion();
assertion.AssertionID = new Guid().ToString();
assertion.AuthenticationInstant = DateTime.Now;
assertion.AuthenticationMethod
= DocuSignWeb.RequestRecipientTokenAuthenticationAssertionAuthenticationMethod.Password;
assertion.SecurityDomain = "Request Recipient Token Test";
@Ergin008
Ergin008 / soap_embedded_signing.php
Last active February 16, 2018 05:00
SOAP Quickstart Embedded Signing (PHP)
// Construct the recipient token authentication assertion and specify
// ID, start time, method, and domain
$assertion = new RequestRecipientTokenAuthenticationAssertion();
$assertion->AssertionID = guid();
$assertion->AuthenticationInstant = nowXsdDate();
$assertion->AuthenticationMethod = RequestRecipientTokenAuthenticationAssertionAuthenticationMethod::Password;
$assertion->SecurityDomain = "Request Recipient Token Test";
// Construct the URLs based on UserName
$recip = $env->Recipients[0];