summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2006-11-24 05:37:35 +0000
committerivan <ivan>2006-11-24 05:37:35 +0000
commit3785f360382e1a9d906e61ddaa9d2ff4b0881704 (patch)
tree77f96127d19ee3c61fea2c1fe7609b7ecf924335
parent17bd710d349b52c0b3f6defaa32e188825af4872 (diff)
bump version to 3.00_05, fix, fix inclusion of B:FS:preCharge in "make install" and "make dist", add back in preCharge tests, add all Phil's recent work to the changelog
-rw-r--r--Changes57
-rw-r--r--Makefile.PL1
-rw-r--r--t/bop.t16
3 files changed, 42 insertions, 32 deletions
diff --git a/Changes b/Changes
index 8a71dea..8f8ef9d 100644
--- a/Changes
+++ b/Changes
@@ -1,32 +1,37 @@
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)
diff --git a/Makefile.PL b/Makefile.PL
index 93a5ebd..54d15bb 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -5,6 +5,7 @@ WriteMakefile(
'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?)
diff --git a/t/bop.t b/t/bop.t
index 2aaf223..8eb762d 100644
--- a/t/bop.t
+++ b/t/bop.t
@@ -1,9 +1,8 @@
#!/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; }
@@ -110,14 +109,19 @@ foreach my $drv (@drivers) {
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