X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=t%2Fcheck.t;fp=t%2Fcheck.t;h=00a95402f4eeca282a06ec90d6f644988aa4234a;hb=7d8253e2ac3dda28c8013aca209570d3e4496567;hp=0000000000000000000000000000000000000000;hpb=449221e481daad31410736547ee5741a00f0f4b8;p=Business-OnlinePayment-PaymentsGateway.git diff --git a/t/check.t b/t/check.t new file mode 100644 index 0000000..00a9540 --- /dev/null +++ b/t/check.t @@ -0,0 +1,30 @@ +BEGIN { $| = 1; print "1..1\n"; } + +use Business::OnlinePayment; + +my $ctx = new Business::OnlinePayment("PaymentsGateway"); +$ctx->content( + type => 'CHECK', + login => '2000', + password => 'merchant4demo', + action => 'Normal Authorization', + amount => '49.95', + invoice_number => '100100', + customer_id => 'jsk', + first_name => 'Tofu', + last_name => 'Beast', + account_number => '12345', + routing_code => '321076441', + 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 { + warn $ctx->result_code. ': '. $ctx->error_message(); + print "not ok 1 (".$ctx->error_message().")\n"; +}