summaryrefslogtreecommitdiff
path: root/t2/check.t
diff options
context:
space:
mode:
authorivan <ivan>2002-12-17 14:04:31 +0000
committerivan <ivan>2002-12-17 14:04:31 +0000
commit449221e481daad31410736547ee5741a00f0f4b8 (patch)
tree1b2bd2206640fabfbef9958fb845e7358ea4cec3 /t2/check.t
initial importBEGIN
Diffstat (limited to 't2/check.t')
-rw-r--r--t2/check.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/t2/check.t b/t2/check.t
new file mode 100644
index 0000000..e253e24
--- /dev/null
+++ b/t2/check.t
@@ -0,0 +1,30 @@
+BEGIN { $| = 1; print "1..1\n"; }
+
+use Business::OnlinePayment;
+
+# checks are broken it seems
+my $ctx = new Business::OnlinePayment("PaymentsGateway");
+$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";
+}