Business::GoCardless::Utils
A role containing gocardless utilities.
Signs the passed params hash using the app secret
my $signature = $self->sign_params( \%params,$app_secret );
Checks the signature is valid for the given params hash with the app secret
if ( ! $self->signature_valid( \%params,$app_secret ) ) { # throw an error }
Generates a random nonce for use with a gocardless request, it being a base64 encoded concatination of the current seconds since epoch + | + rand(256)
my $nonce = $self->generate_nonce;
Flattens a hash as specified by the gocardless API. see https://developer.gocardless.com/#constructing-the-parameter-array
my $flat_params = $self->flatten_params( \%params );
Normalizes the passed params hash into a string for use in queries to the gocardless API. Includes param flattening and RFC5849 encoding
my $query_string = $self->normalize_params( \%params );
Lee Johnson - leejo@cpan.org
leejo@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. If you would like to contribute documentation, features, bug fixes, or anything else then please raise an issue / pull request:
https://github.com/Humanstate/business-gocardless
To install Business::GoCardless, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::GoCardless
CPAN shell
perl -MCPAN -e shell install Business::GoCardless
For more information on module installation, please visit the detailed CPAN module installation guide.