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 http://www.allopass.com for more informations on this system.
METHODS
- new Class constructor. Provides session-based access check.
-
$allopass=Billing::Allopass->new($session_file, [$ttl]);
$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.
- check - Checks if a client have access to this document
-
$allopass->allopass_check($document_id, $code);
- end_session - Ends user session for specified document.
-
$allopass->end_session($document_id);
- allopass_check - Simply checks if a code has been recently validated for this document.
-
allopass_check($document_id, $code);
You must perform this check within 2 minutes after the code is entered.
- get_last_error - Returns last recorded error
-
$allopass->get_last_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 334:
You forgot a '=back' before '=head1'