#################### main pod documentation begin ################### =head1 NAME Zymonic::PayerAuthentication - Zymonic Workflow System PayerAuthentication module =head1 SYNOPSIS Stub object which will be subclassed by different payer authentication implementations. =head1 DESCRIPTION Contains common functionality of all Payer Authentications. =head1 USAGE Not to be used directly, use one of its subclasses. =head1 BUGS NONE =head1 SUPPORT As in the license, Zymonic is provided without warranty or support unless purchased separately, however... If you email zymonic-support@zednax.com your issue will be noted and may receive a response. For security issues, please contact zymonic-security@zednax.com and someone will respond within 8 working hours. =head1 AUTHOR Alex Masidlover et al.a CPAN ID: MODAUTHOR Zednax Limited alex.masidlover@zednax.com http://www.zednax.com =head1 COPYRIGHT This program is free software licensed under the... Alfresco Public License 1.0 The full text of the license can be found in the LICENSE file included with this module. Other licenses may be acceptable if including parts of Zymonic in larger projects, please contact Zednax for details. =head1 SEE ALSO Zymonic::Field Zymonic perl(1). =cut #################### main pod documentation end ################### package Zymonic::PayerAuthentication; use strict; BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = '0.01'; @ISA = qw(Exporter); #Give a hoot don't pollute, do not export more than needed by default @EXPORT = qw(); @EXPORT_OK = qw(); %EXPORT_TAGS = (); } use base "Zymonic::Base"; use Zymonic::Table; use Zymonic::Utils qw(get_array); #################### subroutine header begin #################### =head2 enrolled_result Usage : $payerauth->enrolled_result($card_number, $details) Purpose : Checks whether the incoming card number is enrolled to use payer authentication. Returns : A hashref of enrolled, acs_url, pareq and issuer_cert the latter three if card is enrolled. Argument : Card number to check and hashref of details of transaction Throws : Comment : See Also : =cut #################### subroutine header end #################### sub enrolled_result { my $self = shift; my $card_number = shift; my $details = shift; return { enrolled => '', acs_url => '', pareq => '', issuer_cert => '', status => '' }; } #################### subroutine header begin #################### =head2 pares_result Usage : $payerauth->pares_result($card_number, $details) Purpose : Parses the Payer Authentication Response (pares) value returned after auth. Returns : A hashref of pares, pares_id and pares_auth_code, results of parsing the pares. Argument : Card number and hashref of details including pares, and anything else needed. Throws : nothing Comment : See Also : =cut #################### subroutine header end #################### sub pares_result { my $self = shift; my $card_number = shift; my $details = shift; if ( $details->{pares} ) { return { pares => $details->{pares}, pares_id => '', pares_auth_code => '', status => '' }; } else { return ''; } } 1;