capsens / universign Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
If two requests are made on the time on different threads, it can generate an invalid request.
1 thread, OK :
[1] pry(main)> test = -> { Universign::Transaction.new("0f7c32e2-b989-4017-87c5-d3e2a08eae52").documents.first.content.size }
[3] pry(main)> threads = [Thread.new(&test)]; threads.each(&:join)
=> [#<Thread:0x00007fc1d763c428@(pry):1 dead>]
2 threads, KO :
[2] pry(main)> threads = [Thread.new(&test), Thread.new(&test)]; threads.each(&:join)
#<Thread:0x00007fc1d8952d78@(pry):1 run> terminated with exception (report_on_exception is true):
/Users/antoinebecquet/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:217:in `wait_readable': stream closed in another thread (IOError)
#<Thread:0x00007fc1d8952e68@(pry):1 run> terminated with exception (report_on_exception is true):
/Users/antoinebecquet/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/http/response.rb:382:in `inflate': incorrect header check (Zlib::DataError)
XMLRPC::Client
does no longer belongs to ruby standard library after 2.3.
Gem dependency must be added.
signature_field: Universign::SignatureField.new(coordinate: [100, 100], page: 1)
for example will raise an ArgumentError
Exception
and
signature_field: Universign::SignatureField.new(coordinate: [100, 100], page: 1, name: 'fake_name')
will make the signature flow fail on the server side
Hello !
Would it be possible to use the class UniversignError < StandardError; end
for all the errors:
https://github.com/CapSens/Universign/search?q=StandardError
Like that instead of rescue StandardError
when we call the gem we could use rescue UniversignError
.
It avoid to rescue an error who are not expected in the gem. In my case VCR was throwing an error on the request without cassette.
Thx a lot for the gem :)
Hello everybody, I'm using CapSens/Universign gem to create a transaction with universign. First of all, thank you ๐ . It's is really helpful.
I'm running through a problem with the position of the signature field.
here my code for this:
document_from_content = Universign::Document.new(
name: 'another.pdf',
content: File.open("tmp/test.pdf").read
)
signer = Universign::TransactionSigner.new(
first_name: "Signer's first name",
last_name: "Signer's last name",
email: '[email protected]',
phone_number: 'SOME_PHONE_NUMBER',
success_url: 'https://my_app.com',
signature: Universign::SignatureField.new(coordinate: [37,684], page: 5)
)
transaction = Universign::Transaction.create(
documents: [document_from_content],
signers: [signer],
options: { profile: 'default', final_doc_sent: false, handwritten_signature_mode: 0}
)
I got a code 200 response from this. I can sign the pdf BUT signature stamps are not showing in the PDF generated by Universign when the transaction is completed.
Is it because of this configuration ? Or maybe I didn't understand well the different signatures configurations.
there is my question on stackoverflow :
https://stackoverflow.com/questions/64424793/ror-capsens-universign-signaturefield-the-coordinate-arent-working
I don't think this is really an issue. Can you help me with 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.