This PR fixes failure of Form#redirect_signature on empty input by forcing the secret_key to be a string.
In addition in an extra commit: cleaned up whitespace chars of related files
don't fail on empty input for `redirect_signature_check`
In what case should we calculate a signature without a secret key?
we had the case where the page was called without any params. It returned 500 error because of this problem. I'd like to be very defensive here and expect even a nil secretkey (which is default value anyway).
(btw. saw jruby tests failed, I'm on it..)
I prefer to raise an ArgumentError in this case, given that signing a form without a secret key is never what you want. Swallowing the error and send erroneous requests to Adyen might be even more confusing to users, causing debugging headaches.
In the end, your app should always make sure to set the secret key, and if for some reason this can be nil in your app, rescue the ArgumentError to deal with it nicely.
true ArgumentError is better solution here, I'll update it..
updated to raise ArgumentError instead, added same for `calculate_sig…