summaryrefslogtreecommitdiff
path: root/t/check.t
diff options
context:
space:
mode:
authorivan <ivan>2004-09-03 23:37:13 +0000
committerivan <ivan>2004-09-03 23:37:13 +0000
commit915bd5ff8cf528b62d79d045c436d17d92be4d89 (patch)
tree5e95dc9d5d86557cb7727e917949b3219bf080d6 /t/check.t
inital checking of OpenECHO module
Diffstat (limited to 't/check.t')
-rw-r--r--t/check.t32
1 files changed, 32 insertions, 0 deletions
diff --git a/t/check.t b/t/check.t
new file mode 100644
index 0000000..d64d49c
--- /dev/null
+++ b/t/check.t
@@ -0,0 +1,32 @@
+BEGIN { $| = 1; print "1..1\n"; }
+
+print "ok 1 # Skipped: no ACH test yet\n"; exit;
+
+use Business::OnlinePayment;
+
+# checks are broken it seems
+my $ctx = new Business::OnlinePayment("OpenECHO");
+$ctx->content(
+ type => 'CHECK',
+ login => 'testing',
+ password => 'testing',
+ action => 'Normal Authorization',
+ amount => '49.95',
+ invoice_number => '100100',
+ customer_id => 'jsk',
+ first_name => 'Tofu',
+ last_name => 'Beast',
+ account_number => '12345',
+ routing_code => '123456789',
+ bank_name => 'First National Test Bank',
+);
+$ctx->test_transaction(1); # test, dont really charge
+$ctx->submit();
+
+print $ctx->is_success()."\n";
+
+if($ctx->is_success()) {
+ print "ok 1\n";
+} else {
+ print "not ok 1 (".$ctx->error_message().")\n";
+}