Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually placing signature? #6

Open
sebastianberm opened this issue May 20, 2018 · 16 comments
Open

Actually placing signature? #6

sebastianberm opened this issue May 20, 2018 · 16 comments

Comments

@sebastianberm
Copy link

It wouldn't take much for an acutal signature to be required.
But is there some place where this can be stored or placed on the PDF before mailing?
This would be great if possible.

Getting the signature field ready isn't difficult, but merging that and storing it... I don't know.

@WilliamDEdwards
Copy link
Contributor

I was thinking about it. HostFact already includes required assets for placing a signature, because of the ability to sign to agree to a quote, so it doesn't seem like a very crazy idea to me.

@sebastianberm
Copy link
Author

If we would barrow from klantenpaneel/core/views/pricequote.accept.phtml it should be pretty easy to create such a screen. I just don't know how to place the signature at the right location on the right page of our PDF and store it. If that would be possible, we'd just need to be able to sign it without having to login and it would be a 100% solution for everyone...

@WilliamDEdwards
Copy link
Contributor

I'm not sure if it'd be a good idea to allow for signing the DPA without logging in first (from a legal standpoint)... Maybe we should add it to the config as an option?

Also, the signature wouldn't have to be in the PDF itself per se... The signature field could be shown instead of the checkbox.

@sebastianberm
Copy link
Author

True, config value would be better. Most of our users usually can't remember the correct credentials, but we can authenticate them via email/phone (as we usually do).

It would be great to be able to store that tough as an actual signed document. But that would be phase 2 (or 3).
For now, just getting and storing the signature would be great...

@WilliamDEdwards
Copy link
Contributor

WilliamDEdwards commented May 20, 2018

We were testing with a solution that allows for signing 'inside' the file, but every PDF has a different format and layout.. I don't think having a signature field for every document would scale. It would be a nice addition, though.

In case anyone has recommendations for a good library, I'd be happy to review them. But for now, ticking that checkbox and submitting is fine from a legal point of view.

If anyone does a PR for this feature, I'd be happy to test to help speed things up. :)

@YWatchman
Copy link
Contributor

@sebastianberm I was busy building that with the Stiply API I wrote the wrapper for it, but we ran out of time and started building this.

I will take a look at the default functionality of HostFact for signing a quote.

@sebastianberm
Copy link
Author

The main problem I see is actually storing the base64 encoded value of the signature. First of all, that's how Hostfact does it with quotes. But the main problem is... It requires a field.

And at the moment, this method is abusing a fault in the HostFact API, the plugin stores 'dd-mm-yyyy ({ip})' in the value field of a checkbox, that should be unset, 0 or 1. This should trigger an error in my humble opinion.
There is no space for the signature anywhere.

@WilliamDEdwards
Copy link
Contributor

I'm not sure what the problem would be to add a field.

@sebastianberm
Copy link
Author

The problem there is it should be base64 encoded, so you'd get a unreadable string everywhere, that can easily be corrupted by editing the client.

@WilliamDEdwards
Copy link
Contributor

WilliamDEdwards commented May 21, 2018

Well, it could be a text file... But that isn't elegant in the slightest.

file_put_contents($this->getDebtor() . '.txt', $base64string);

@YWatchman
Copy link
Contributor

YWatchman commented May 25, 2018 via email

@WilliamDEdwards
Copy link
Contributor

WilliamDEdwards commented May 25, 2018

That means users would have to execute an SQL query to get the right schema. I don't think they're willing to do that.

@YWatchman
Copy link
Contributor

What do you mean?

@WilliamDEdwards
Copy link
Contributor

If you save it in a database table that has nothing to do with HostFact, users would have to create the table with an SQL query.

I think that would be a showstopper for many potential users.

@YWatchman
Copy link
Contributor

It is an extra feature, you don't necessarily have to activate it. A file however that has the contents would be around ~30% bigger in many cases.

@YWatchman
Copy link
Contributor

YWatchman commented May 25, 2018

To make it easier, we could build an 'install' function that creates the table for easy use.

Edit: Our modules in /Pro have a certain structure we cannot share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants