X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=t%2Fbad_auth.t;fp=t%2Fbad_auth.t;h=8369a9f75aed277342e8a3dd1e7d2134e0fa58c8;hb=196db498d6a75d4a772946049fbaee6b4700dd85;hp=0000000000000000000000000000000000000000;hpb=fc1c50ec369553974c7ea4cef4419003d41067ee;p=Business-OnlinePayment-LinkPoint.git diff --git a/t/bad_auth.t b/t/bad_auth.t new file mode 100644 index 0000000..8369a9f --- /dev/null +++ b/t/bad_auth.t @@ -0,0 +1,42 @@ +BEGIN { $| = 1; print "1..1\n"; } + +use Business::OnlinePayment; + +my $tx = new Business::OnlinePayment("LinkPoint", + 'storename' => '1909796604', + 'keyfile' => './test.pem', + 'server' => 'staging.linkpt.net', +); + +$tx->content( + type => 'VISA', + action => 'Normal Authorization', + description => 'Business::OnlinePayment::LinkPoint visa test', + amount => '0.01', + first_name => 'Tofu', + last_name => 'Beast', + address => '123 Anystreet', + city => 'Anywhere', + state => 'UT', + zip => '84058', + country => 'US', + email => 'ivan-linkpoint@420.am', + card_number => '4007000000027', + expiration => '12/2008', + 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; +} +