realcrowd / hellosign.net Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi,
i have try to just send the signature request to me and some one my code is running fine no error found but the signature id not generated... and following response come
HelloSign\SignatureRequest Object ( [resource_type:protected] => signature_request [signature_request_id:protected] => [is_complete:protected] => [has_error:protected] => [files_url:protected] => [signing_url:protected] => [details_url:protected] => [cc_email_addresses:protected] => Array ( ) [custom_fields:protected] => Array ( ) [response_data:protected] => [signatures:protected] => HelloSign\SignatureList Object ( [resource_class:protected] => Signature [collection:protected] => Array ( ) [position:protected] => 0 ) [form_fields_per_document:protected] => Array ( ) [signing_redirect_url:protected] => [requesting_redirect_url:protected] => [signers:protected] => HelloSign\SignerList Object ( [resource_class:protected] => Signer [collection:protected] => Array ( [0] => HelloSign\Signer Object ( [name:protected] => Jack [email_address:protected] => [email protected] [order:protected] => [pin:protected] => ) [1] => HelloSign\Signer Object ( [name:protected] => dina [email_address:protected] => [email protected] [order:protected] => [pin:protected] => ) ) [position:protected] => 0 ) [requester_email_address:protected] => [use_text_tags:protected] => [hide_text_tags:protected] => [metadata:protected] => Array ( ) [warnings:protected] => Array ( ) [test_mode:protected] => 1 [title:protected] => Sign New Doc For Our Relationship [subject:protected] => New NDA Sign For Our Business Relationship... [message:protected] => Please sign this NDA and then we can discuss more. Let me know if you have any questions. [file:protected] => Array ( [0] => @nda.docx [1] => @C:\wamp\www\NewHelloSign\library ) [file_url:protected] => Array ( ) )
and here is my code...
enableTestMode(); $request->setTitle('Sign New Doc For Our Relationship'); $request->setSubject('New NDA Sign For Our Business Relationship...'); $request->setMessage('Please sign this NDA and then we can discuss more. Let me know if you have any questions.'); $request->addSigner('[email protected]', 'Jack'); $request->addSigner(new HelloSign\Signer(array( 'name' => 'dina', 'email_address' => '[email protected]' ))); $request->addFile('nda.docx'); $request->addFile(**DIR**); $response = $client->sendSignatureRequest($request); print_r($response); echo $response->signature_request_id; ?>please suggest me what i will do to get signature id... thanks..
For reasons I cannot explain, the Asynchronous code provided in HelloSignService.cs does not function.
When updating to:
using (var requestStream = webReq.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
using (WebResponse response = webReq.GetResponse())
{
using (Stream responseStream = response.GetResponseStream())
{
StreamReader reader = new StreamReader(responseStream);
string responseString = reader.ReadToEnd();
return JsonConvert.DeserializeObject<T>(responseString);
}
}
My application functions flawlessly.
I'm going to use Embedded signature. For that purposes, I think what I need to do first of all is getting embedded signature URL which I can use later in client side. And this is what I've tried:
"Simplified"
public async Task<String> GetSignatureUrl(){
client = new HelloSignClient("MyApiKey", "");
var request = new SignatureRequestSendRequest {
Title = "this is title,
Subject = "this is subject,
Message = "this is message,
TestMode = 1,
Signers = new List<SignerRequest>{
new SignerRequest{
EmailAddress = "[email protected],
Name = "Full Name",
Order = 0
}
},
CcEmailAddresses = new List<string>{
"[email protected]"
},
Files = new List<string>{"an_existing_file.pfd"}
};
var signatureResponse = await client.SignatureRequest.CreateEmbeddedAsync(request);
var signatureUrlResponse = await client.Embedded.GetSignUrlAsync(signatureResponse.First().Signatures.First().SignatureId);
return signatureUrlResponse.SignUrl;
}
I'm using test mode. I've configured API side as that is documented in HelloSign.com. I've put callback URLs for both "Account" and "App", which are valid URLs that return "Hello API Event Received" and processes the responses coming from HelloSign.
So, I think I've done all the things what I supposed to do, but when try, I am getting the following error.
with the following stack trace:
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at RealCrowd.HelloSign.HelloSignService.<MakePostRequestAsync>d__1b`1.MoveNext() in c:\Users\UserName\ProjectRoot\hellosign.net-master\hellosign.net-master\src\RealCrowd.HelloSign\Services\HelloSignService.cs:line 106
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Please suggest, this is kinda urgent. What is wrong, or what is missing?
Thanks.
DISREGARD / DELETE
When attempting to use this Library, my application gets to:
HelloSignService.cs
Line 101: using (var requestStream = await webReq.GetRequestStreamAsync())
Then simply exits without error, I stepped through the entire application and when it gets there it simply closes?
When using the API key instead of username password the password is required to be left blank, but changing the kernel config to use an empty string for password throws an exception
"Cannot be null or empty Parameter name: name"
I'm not that familiar with ninject is the a way to work around this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.