summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-05-07 06:55:53 +0000
committerivan <ivan>2004-05-07 06:55:53 +0000
commit0430d22d4819bea8ccd61e2ea6b7e9554359ed48 (patch)
tree4e770929ba92aac003d5c682d0000e06b775b95d
parentdd5c4b34ba2bb52e599b7b84416a34debe79022d (diff)
add multiple_xactions test
-rw-r--r--MANIFEST1
-rw-r--r--t2/credit_card.t2
-rw-r--r--t2/multiple_xations.t52
3 files changed, 54 insertions, 1 deletions
diff --git a/MANIFEST b/MANIFEST
index ba825d8..d6f1589 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,5 +7,6 @@ t/bop.t
t/load.t
t2/credit_card.t
t2/bad_auth.t
+t2/multiple_xactions.t
#t2/check.t
#t2/capture.t
diff --git a/t2/credit_card.t b/t2/credit_card.t
index a0cab12..a0c3603 100644
--- a/t2/credit_card.t
+++ b/t2/credit_card.t
@@ -9,7 +9,7 @@ my $tx = new Business::OnlinePayment("StGeorge",
$tx->content(
login => '10005432',
- password => 'cretphrase',
+ password => 'certphrase',
type => 'CC',
action => 'Normal Authorization',
description => 'Business::OnlinePayment::LinkPoint visa test',
diff --git a/t2/multiple_xations.t b/t2/multiple_xations.t
new file mode 100644
index 0000000..b756f05
--- /dev/null
+++ b/t2/multiple_xations.t
@@ -0,0 +1,52 @@
+BEGIN { $| = 1; print "1..2\n"; }
+
+use Business::OnlinePayment;
+
+for my $testnum ( 1 .. 2 ) {
+ &run_xaction($testnum);
+}
+
+sub run_xaction {
+
+ my $testnum = shift;
+
+ my $tx = new Business::OnlinePayment("StGeorge",
+ # 'cert_path' => './java.cert',
+ 'cert_path' => '/home/ivan/Business-OnlinePayment-StGeorge/t2/java.cert',
+ );
+
+ $tx->content(
+ login => '10005432',
+ password => 'certphrase',
+ type => 'CC',
+ action => 'Normal Authorization',
+ description => 'Business::OnlinePayment::LinkPoint visa test',
+ amount => '1.00',
+ first_name => 'Tofu',
+ last_name => 'Beast',
+ address => '123 Anystreet',
+ city => 'Anywhere',
+ state => 'UT',
+ zip => '84058',
+ country => 'US',
+ email => 'ivan-stgeorge@420.am',
+ card_number => '4564456445644564',
+ expiration => '12/2005',
+ );
+
+ $tx->test_transaction(1);
+
+ $tx->submit();
+
+ if($tx->is_success()) {
+ print "ok $testnum\n";
+ $auth = $tx->authorization;
+ warn "********* $auth ***********\n";
+ } else {
+ print "not ok $testnum\n";
+ warn '***** '. $tx->error_message. " *****\n";
+ exit;
+ }
+
+}
+