The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Business::OnlinePayment::StoredTransaction - Perl extension using the Business::OnlinePayment interface to store credit card transactions safely for later billing.

SYNOPSIS

  use Business::OnlinePayment;
  my $tx = new Business::OnlinePayment('StoredTransaction');
  $tx->content( type => 'Visa',
                amount => '1.00',
                cardnumber => '1234123412341238',
                expiration => '0100',
                action => 'normal authorization',
                name => 'John Doe',
                password => '-----BEGIN RSA PUBLIC KEY-----
MIGJAoGBAOoKKH0CZm6sWHGg4SygikvvAecDS+Lx6ilUZ8mIVJeV2d6YjEJRjy12
TSFdJTC0SiBDbJ4UHz5ayXhLShK0VvaQY+sfZwMX1SNZNYUyO8T7gY7QCzOrcSTS
CcBBrNWzz0CMWUO5oOIIYevKEimtsDvBtlVaYJArJdwJq9KB/RjRAgMA//8=
-----END RSA PUBLIC KEY-----' );

  $tx->submit();
  if ($tx->is_success()) {
      my $auth = $tx->authorization();
      open FH, '>> /some/file' # don't do this it's stupid
      print FH $auth;
  }
  else {
      warn $tx->error_message();
  }

DESCRIPTION

This module stores uses the Business::OnlinePayment interface to store credit card details in a (hopefully) secure manner. It uses Storable to store the content, encrypts the content with a random Blowfish key, then encrypts the key with a programmer supplied public RSA key. The encrypted key, and content is base64 encoded and concatenated together and returned by the authorization() method as a string, which can then be stored in a database or on disk, to be retrieved by the Business::OnlinePayment::StoredTransaction::Unstore module using the corresponding private key (which should not be kept on the same server). Hopefully, if my implementation doesn't suck, this means that once the credit card information is encrypted, there is no way to get it back without the correct private key, which of course should be stored somewhere safe. I am however not a cryptographer, so it is up to you as the user of this module to determine if this is safe enough for you.

EXPORT

None by default.

SEE ALSO

Business::OnlinePayment Crypt::OpenSSL::RSA Crypt::Blowfish Crypt::CBC Business::OnlinePayment::StoredTransaction::Unstore

AUTHOR

mock, <mock@obscurity.org<gt>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by mock

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.