summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-11-24 02:54:42 +0000
committerivan <ivan>2009-11-24 02:54:42 +0000
commit5c008be3b9bb7eb5c7423cf174399c57a19ee707 (patch)
tree6a22e3c2c8acde2536fe43588cf578b0037adeea
parent5b03d96b42ff9aa46bda1ad21dd674c2713ace83 (diff)
add introspection info used in Business::OnlinePayment 3.01+
-rw-r--r--Changes3
-rw-r--r--IPPay.pm27
-rw-r--r--MANIFEST1
-rw-r--r--t/introspection.t17
4 files changed, 47 insertions, 1 deletions
diff --git a/Changes b/Changes
index c904684..8f25fda 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension Business::OnlinePayment::IPPay.
+0.05 unreleased
+ - add introspection info used in Business::OnlinePayment 3.01+
+
0.04 Tue Jul 22 12:19:54 2008 EDT
- force country and ship country to ISA-3166-alpha-3
diff --git a/IPPay.pm b/IPPay.pm
index 9c35919..bc97446 100644
--- a/IPPay.pm
+++ b/IPPay.pm
@@ -11,10 +11,34 @@ use Business::OnlinePayment::HTTPS;
use vars qw($VERSION $DEBUG @ISA $me);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.04';
+$VERSION = '0.05_01';
+$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
+
$DEBUG = 0;
$me = 'Business::OnlinePayment::IPPay';
+sub _info {
+ {
+ 'info_version' => '0.01',
+ 'module_version' => $VERSION,
+ 'supported_types' => [ qw( CC ECHECK ) ],
+ 'supported_actions' => { 'CC' => [
+ 'Normal Authorization',
+ 'Authorization Only',
+ 'Post Authorization',
+ 'Void',
+ 'Credit',
+ ],
+ 'ECHECK' => [
+ 'Normal Authorization',
+ 'Void',
+ 'Credit',
+ ],
+ },
+ 'CC_void_requires_card' => 1,
+ };
+}
+
sub set_defaults {
my $self = shift;
my %opts = @_;
@@ -397,6 +421,7 @@ sub _xmlwrite {
}
1;
+
__END__
=head1 NAME
diff --git a/MANIFEST b/MANIFEST
index c782755..1ce0cab 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,4 +7,5 @@ t/00load.t
t/card.t
t/check.t
t/bop.t
+t/introspection.t
META.yml Module meta-data (added by MakeMaker)
diff --git a/t/introspection.t b/t/introspection.t
new file mode 100644
index 0000000..38a76f1
--- /dev/null
+++ b/t/introspection.t
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+eval 'use Business::OnlinePayment 3.01;';
+if ( $@ ) {
+ plan skip_all => 'Business::OnlinePayment 3.01+ not available';
+} else {
+ plan tests => 1;
+}
+
+my($login, $password, @opts) = ('TESTMERCHANT', '',
+ 'default_Origin' => 'RECURRING' );
+
+my $tx = Business::OnlinePayment->new("IPPay", @opts);
+
+ok( $tx->info('CC_void_requires_card') == 1, 'CC_void_requires_card introspection' );