SagePay::XORForm - Perl extension for SagePay XOR form encryption
use SagePay::XORForm; my $obj = SagePay::XORForm->new( query_string => 'my form details string', key => 'my password string to encrypt with'); my $encrypted_str = $obj->sage_xor_string(\%options);
Documentation for SagePay::XORForm. This module has been created to help ease the pain in creating a Perl side solution with the SagePay Form integration where an XOR encryption type format is required when posting data
Class constructor, simply pass in the query string and password key strings, the module will croak without these values included. NB you must know what your account password is as this will serve as the key
Call this method and the encrypted XOR string will be returned
By default it's disabled but if you'd like new lines to be stripped set to 1 to enable e.g.
my $enc_string = $obj->sage_xor_string({'strip_newlines' => 1});
MIME::Base64
SagePay documentation - http://www.sagepay.com/sites/default/files/pdf/user_guides/sagepayformprotocolandintegrationguidelines.pdf
Cris Pini, <cris@perlconsulting.co.uk<gt>
Copyright (C) 2012 by Cris Pini
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install SagePay::XORForm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SagePay::XORForm
CPAN shell
perl -MCPAN -e shell install SagePay::XORForm
For more information on module installation, please visit the detailed CPAN module installation guide.