summaryrefslogtreecommitdiff
path: root/t/bad_auth.t
diff options
context:
space:
mode:
authorivan <ivan>2003-01-14 05:52:12 +0000
committerivan <ivan>2003-01-14 05:52:12 +0000
commit2bdce7b0c9d7468d676ee4bfa824b1fb0cbba207 (patch)
tree0276ab22282e798870f2e7b7adc0a40fdce5bdfd /t/bad_auth.t
initial importSTART
Diffstat (limited to 't/bad_auth.t')
-rw-r--r--t/bad_auth.t43
1 files changed, 43 insertions, 0 deletions
diff --git a/t/bad_auth.t b/t/bad_auth.t
new file mode 100644
index 0000000..e0db291
--- /dev/null
+++ b/t/bad_auth.t
@@ -0,0 +1,43 @@
+BEGIN { $| = 1; print "1..2\n"; }
+
+use Business::OnlinePayment;
+
+my $tx = new Business::OnlinePayment("PayflowPro",
+# 'storename' => '000000',
+# 'keyfile' => '/path/to/cert.pem',
+# 'lbin' => '/path/to/lbin',
+# 'tmp' => '/path/to/secure/tempdir',
+);
+
+$tx->content(
+ type => 'VISA',
+ action => 'Normal Authorization',
+ description => 'Business::OnlinePayment::PayflowPro visa test',
+ amount => '0.01',
+ first_name => 'Tofu',
+ last_name => 'Beast',
+ address => '123 Anystreet',
+ city => 'Anywhere',
+ state => 'UT',
+ zip => '84058',
+ country => 'US',
+ email => 'ivan-payflowpro@420.am',
+ card_number => '4007000000027',
+ expiration => '12/2002',
+# result => 'DECLINE',
+);
+
+$tx->test_transaction(1);
+
+$tx->submit();
+
+if($tx->is_success()) {
+ print "not ok 1\n";
+ $auth = $tx->authorization;
+ warn "********* $auth ***********\n";
+} else {
+ print "ok 1\n";
+ warn '***** '. $tx->error_message. " *****\n";
+ exit;
+}
+