Revision history for Perl extension Business::OnlinePayment.
3.00_05 unreleased
- - Phil Lobbes is responsible for all work in this release. Thanks!
- - Reworked _pre_submit functionality:
- - Add Class data %WrappedSubmitClassMethod to remember "wrapped"
- submit
- - Fix new() to check %WrappedSubmitClassMethod to avoid creating
- deep recursion
- - Used feedback from MSCHWERN / Bug #22074 to cleanup
- new/_pre_submit more
- - Now always wrap submit() method with _pre_submit() (but only once)
- - no longer populate _child_submit, code in anon sub was cleaned up
- - use return values from _pre_submit to determine if real submit is
- called. the return values from _pre_submit should be
- reviewed/verified still
- - _risk_detect(): explicity set return value
- - _pre_submit(): explicity set return value
- - Updated tests:
- - 8 new tests and 1 new "MOCK3" driver for testing _pre_submit()
- functionality
- - test for new() replacing subclass submit and causing deep
- recursion
- - minor cleanup of test drivers
- - fix "submit unchanged" test case: now wrapped with _pre_submit()
- always
- - Updated POD documentation:
- - Minor documentation change in print statements use ',' instead
- of '.'
+ - Update Makefile.PL so Business::FraudDetect::preCharge is installed,
+ included by make dist, etc.
+ - Phil Lobbes is responsible for the rest of the work in this release.
+ Thanks!
+ - Reworked _pre_submit functionality:
+ - Add Class data %WrappedSubmitClassMethod to remember "wrapped"
+ submit
+ - Fix new() to check %WrappedSubmitClassMethod to avoid creating
+ deep recursion
+ - Used feedback from MSCHWERN / Bug #22074 to cleanup
+ new/_pre_submit more
+ - Now always wrap submit() method with _pre_submit() (but only
+ once)
+ - no longer populate _child_submit, code in anon sub was cleaned
+ up
+ - use return values from _pre_submit to determine if real submit
+ is called. the return values from _pre_submit should be
+ reviewed/verified still
+ - _risk_detect(): explicity set return value
+ - _pre_submit(): explicity set return value
+ - Updated tests:
+ - 8 new tests and 1 new "MOCK3" driver for testing _pre_submit()
+ functionality
+ - test for new() replacing subclass submit and causing deep
+ recursion
+ - minor cleanup of test drivers
+ - fix "submit unchanged" test case: now wrapped with _pre_submit()
+ always
+ - Updated POD documentation:
+ - Minor documentation change in print statements use ',' instead
+ of '.'
3.00_04 Tue Oct 10 12:49:43 PDT 2006
- failure statues (see notes_for_module_writers_v3)
'NAME' => 'Business::OnlinePayment',
'VERSION_FROM' => 'OnlinePayment.pm', # finds $VERSION
'AUTHOR' => 'Ivan Kohler <ivan-business-onlinepayment@420.am>',
+ 'PMLIBDIRS' => [ 'OnlinePayment', 'FraudDetect' ],
'NORECURS' => 1, # dont descend into subdirectories
'PREREQ_PM' => {
# for HTTPS (maybe it should be a separate dist?)
#!/usr/bin/perl
-# $Id: bop.t,v 1.9 2006-11-20 06:27:14 plobbes Exp $
use strict;
use warnings;
-use Test::More tests => 60;
+use Test::More tests => 62;
BEGIN { use_ok("Business::OnlinePayment") or exit; }
is( $obj2->submit, "1", "MOCK3(obj2) submit returns 1" );
# fraud detection failure modes
- my $obj = $package->new("MOCK3");
- my $proc = "__BOGUS_PROCESSOR";
+ my $obj = $package->new("MOCK3");
+ my $bogus = "__BOGUS_PROCESSOR";
+ my $valid = "preCharge";
- is( $obj->fraud_detect($proc), $proc, "fraud_detect set to '$proc'" );
+ is( $obj->fraud_detect($bogus), $bogus, "fraud_detect set to '$bogus'" );
eval { $obj->submit; };
is( $@, "", "fraud_detect ignores non-existant processors" );
- # XXX: need more test cases for when fraud detection is enabled
+ is( $obj->fraud_detect($valid), $valid, "fraud_detect set to '$valid'" );
+ eval { $obj->submit; };
+ like( $@, qr/^missing required /, "fraud_detect($valid) missing fields" );
+
+ # XXX: more test cases for preCharge needed
}
{ # content