From 32073e637db2c5c91b726072f891c36ebd8b3d10 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 7 Nov 2005 11:10:08 +0000 Subject: - Switch from GET to POST, as per old 1.5 prerelease from Michael Lehmkuhl - Don't check expiration for ECHECK and refunds - For the unsupported "void" action, return is_success 0 and error msg suggesting "credit" action, instead of croaking. This way the "try void first, if it fails, try credit" idiom will work. - tests: enable check.t and add crypt_check.t and {crypt_}bad_check.t - update with new test account --- t/check.t | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 't/check.t') diff --git a/t/check.t b/t/check.t index d64d49c..c68c442 100644 --- a/t/check.t +++ b/t/check.t @@ -1,6 +1,9 @@ BEGIN { $| = 1; print "1..1\n"; } -print "ok 1 # Skipped: no ACH test yet\n"; exit; +eval "use Net::SSLeay;"; +if ( $@ ) { + print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit; +} use Business::OnlinePayment; @@ -8,8 +11,8 @@ use Business::OnlinePayment; my $ctx = new Business::OnlinePayment("OpenECHO"); $ctx->content( type => 'CHECK', - login => 'testing', - password => 'testing', + 'login' => '123>4685706', + 'password' => '09437869', action => 'Normal Authorization', amount => '49.95', invoice_number => '100100', @@ -17,8 +20,11 @@ $ctx->content( first_name => 'Tofu', last_name => 'Beast', account_number => '12345', - routing_code => '123456789', + routing_code => '026009593', bank_name => 'First National Test Bank', + phone => '420-420-5454', + payee => 'Tofu Heavy Enterprises, GmbH', + check_number => '420', ); $ctx->test_transaction(1); # test, dont really charge $ctx->submit(); @@ -28,5 +34,6 @@ print $ctx->is_success()."\n"; if($ctx->is_success()) { print "ok 1\n"; } else { + warn $ctx->error_message(); print "not ok 1 (".$ctx->error_message().")\n"; } -- cgit v1.2.1