r67971 - in /branches/upstream/libbusiness-onlinepayment-ippay-perl/current: Changes IPPay.pm MANIFEST META.yml t/card.t t/check.t t/lib/ t/lib/test_account.pl
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Thu Jan 27 22:42:31 UTC 2011
Author: periapt-guest
Date: Thu Jan 27 22:42:25 2011
New Revision: 67971
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=67971
Log:
[svn-upgrade] new version libbusiness-onlinepayment-ippay-perl (0.06)
Added:
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/test_account.pl
Modified:
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/MANIFEST
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/check.t
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes Thu Jan 27 22:42:25 2011
@@ -1,4 +1,7 @@
Revision history for Perl extension Business::OnlinePayment::IPPay.
+
+0.06 Wed Jan 26 13:15:21 PST 2011
+ - fix january bug in tests
0.05 Mon Jul 19 10:19:34 EDT 2010
- add introspection info used in Business::OnlinePayment 3.01+
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm Thu Jan 27 22:42:25 2011
@@ -11,7 +11,7 @@
use vars qw($VERSION $DEBUG @ISA $me);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.05';
+$VERSION = '0.06';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
$DEBUG = 0;
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/MANIFEST?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/MANIFEST (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/MANIFEST Thu Jan 27 22:42:25 2011
@@ -8,4 +8,5 @@
t/check.t
t/bop.t
t/introspection.t
+t/lib/test_account.pl
META.yml Module meta-data (added by MakeMaker)
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml Thu Jan 27 22:42:25 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Business-OnlinePayment-IPPay
-version: 0.05
+version: 0.06
abstract: ~
author:
- Jeff Finucane <ippay at weasellips.com>
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t Thu Jan 27 22:42:25 2011
@@ -1,9 +1,9 @@
#!/usr/bin/perl -w
use Test::More;
+require "t/lib/test_account.pl";
-my($login, $password, @opts) = ('TESTMERCHANT', '',
- 'default_Origin' => 'RECURRING' );
+my($login, $password, %opt) = test_account_or_skip('card');
plan tests => 43;
use_ok 'Business::OnlinePayment';
@@ -35,7 +35,7 @@
# valid card number test
{
- my $tx = Business::OnlinePayment->new("IPPay", @opts);
+ my $tx = Business::OnlinePayment->new("IPPay", %opt);
$tx->content(%content);
tx_check(
$tx,
@@ -55,7 +55,7 @@
# invalid card number test
{
- my $tx = Business::OnlinePayment->new("IPPay", @opts);
+ my $tx = Business::OnlinePayment->new("IPPay", %opt);
$tx->content(%content, card_number => "4111111111111112" );
tx_check(
$tx,
@@ -71,7 +71,7 @@
# authorization only test
{
- my $tx = Business::OnlinePayment->new("IPPay", @opts);
+ my $tx = Business::OnlinePayment->new("IPPay", %opt);
$tx->content(%content, action => 'authorization only', amount => '3.00' );
tx_check(
$tx,
@@ -91,7 +91,7 @@
# post authorization test
SKIP: {
- my $tx = new Business::OnlinePayment( "IPPay", %opts );
+ my $tx = new Business::OnlinePayment( "IPPay", %opt );
$tx->content( %content, 'action' => "post authorization",
'amount' => $postable_amount, # not required
'order_number' => $postable,
@@ -110,7 +110,7 @@
# void test
SKIP: {
- my $tx = new Business::OnlinePayment( "IPPay", %opts );
+ my $tx = new Business::OnlinePayment( "IPPay", %opt );
$tx->content( %content, 'action' => "Void",
'order_number' => $voidable,
'authorization' => $voidable_auth,
@@ -129,7 +129,7 @@
# credit test
SKIP: {
- my $tx = new Business::OnlinePayment( "IPPay", %opts );
+ my $tx = new Business::OnlinePayment( "IPPay", %opt );
$tx->content( %content, 'action' => "credit");
tx_check(
$tx,
@@ -178,10 +178,3 @@
);
}
-sub expiration_date {
- my($month, $year) = (localtime)[4,5];
- $year++; # So we expire next year.
- $year %= 100; # y2k? What's that?
-
- return sprintf("%02d/%02d", $month, $year);
-}
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/check.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/check.t?rev=67971&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/check.t (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/check.t Thu Jan 27 22:42:25 2011
@@ -1,8 +1,9 @@
#!/usr/bin/perl -w
use Test::More;
+require "t/lib/test_account.pl";
-my($login, $password, %opt) = ('TESTMERCHANT', '', 'Origin' => 'RECURRING' );
+my($login, $password, %opt) = test_account_or_skip('check');
plan tests => 16;
use_ok 'Business::OnlinePayment';
Added: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/test_account.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/test_account.pl?rev=67971&op=file
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/test_account.pl (added)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/lib/test_account.pl Thu Jan 27 22:42:25 2011
@@ -1,0 +1,42 @@
+sub test_account_or_skip {
+ my $suffix = shift;
+ my($login, $password, %opt) = test_account($suffix);
+
+ unless( defined $login ) {
+ plan skip_all => "No test account";
+ }
+
+ return($login, $password, %opt);
+}
+
+sub test_account {
+ my $suffix = shift || 'card';
+
+ my($login, $password) = ('TESTMERCHANT', '');
+
+ my %opt;
+ if ( $suffix eq 'check ' ) {
+ %opt = ('Origin' => 'RECURRING');
+ } else {
+ %opt = ('default_Origin' => 'RECURRING');
+ }
+
+ return($login, $password, %opt);
+}
+
+sub expiration_date {
+ my($month, $year) = (localtime)[4,5];
+ $month += 1;
+ $year++; # So we expire next year.
+ $year %= 100; # y2k? What's that?
+
+ return sprintf("%02d/%02d", $month, $year);
+}
+
+#sub tomorrow {
+# my($day, $month, $year) = (localtime(time+86400))[3..5];
+# return sprintf("%04d-%02d-%02d", $year+1900, ++$month, $day);
+#}
+
+1;
+
More information about the Pkg-perl-cvs-commits
mailing list