NAME
Billing::Allopass - A class for micropayment system from allopass http://www.allopass.com/
SYNOPSIS
### Session-based access control (more secure)
use Billing::Allopass;
my $allopass=Billing::Allopass->new($session_file, [$ttl]);
# Check access
if ($allopass->check($document_id, [$RECALL])){
print "OK\n";
} else {
print $allopass->get_last_error;
}
# No further access for this user
$allopass->end_session($document_id);
OR
### Simple access control
use Billing::Allopass;
if (allopass_check($document_id, $RECALL)){
print "OK\n";
} else {
print "NOK\n";
}
DESCRIPTION
This class provides you a easy api for the allopass.com system. It automatically handles user sessions. See l<http://www.allopass.com> for more informations on this system.
METHODS
- $allopass=Billing::Allopass-new($session_file, [$ttl]);> Class constructor. Provides session-based access check. $session_file is the physical location for the session file. The webserver must have write access to it. $ttl is the number of minutes of inactivity for automatically removing sessions. Default : 60. This function returns 0 if there are no write access to $session_file. This file must exists before calling this constructor.
- allopass_check($document_id, $code) - Simply checks if a code has been recently validated for this document. You must perform this check within 2 minutes after the code is entered.
- check - Checks if a client have access to this document Must be used in class context
- $allopass-end_session($document_id)> - Ends user session for specified document.
- $allopass-get_last_error()> - Returns last recorded error
AUTHOR
Bernard Nauwelaerts <bpn@it-development.be>
LICENSE
GPL/Artistic. Enjoy ! See COPYING for further informations on the GPL.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 299:
You forgot a '=back' before '=head1'