[bop-devel] AuthorizeNet MD5 Check

Bill Moseley moseley at hank.org
Tue Sep 25 13:09:56 PDT 2007


On Tue, Sep 25, 2007 at 12:57:00PM -0700, Ivan Kohler wrote:

(moving to the list)

> > What's the recommended way to subclass a processor module?
> 
> I don't think that's recommended in the first place.  I can't say I've 
> ever given it much thought.  The only time I've ever subclassed a 
> processor module was for the Authorize.net compatible gateways, where I 
> overrode the set_defaults method.
> 
> What are you trying to do?

Provide additional functionality.  For example, as I commented before,

    $tx->validate_md5( $secret );

or even just to override submit to include the md5 check.

Or other methods for, say, logging or wrapping up a transaction, for example, as in my
case, in a SOAP response.

That would add the ability to validate the md5 returned in the
response.

The current method for loading processors complicates subclassing a
bit.

Is there an advantage of doing:

    my $tx = Business::OnlinePayment->new( 'AuthorizeNet' );

vs.

    my $tx = Business::OnlinePayment::AuthorizeNet->new;

Which would facilities subclassing.




-- 
Bill Moseley
moseley at hank.org



More information about the bop-devel mailing list