[bop-devel] AuthorizeNet MD5 Check
Bill Moseley
moseley at hank.org
Tue Sep 25 15:00:30 PDT 2007
On Tue, Sep 25, 2007 at 02:03:07PM -0700, Ivan Kohler wrote:
> > Provide additional functionality. For example, as I commented before,
> >
> > $tx->validate_md5( $secret );
> >
> > or even just to override submit to include the md5 check.
>
> This seems like you would modify the module itself, not write a separate
> class.
AuthorizeNet ISA Business::OnlinePayment, so seems very Perl-like to
make MyGatewaySubclass ISA Business::OnlinePayment::AuthroizeNet.
> Yes, the advantage is very much the whole reason why we have a class of
> modules within a framework and not disparate modules.
>
> my $tx = Business::OnlinePayment->new( $processor, %options );
>
> is better than:
>
> my $tx = eval "Business::OnlinePayment::$processor->new( \%options )";
> die $@ if $@;
You don't mean string eval there. And I don't think you mean eval
block, either.
use Business::OnlinePayment::AuthorizeNet;
my $gateway = Business::OnlinePayment::AuthorizeNet->new( \%options );
I'd suggest separate gateway, request, and response objects, too. But
that's another topic.
--
Bill Moseley
moseley at hank.org
More information about the bop-devel
mailing list