1#!/usr/bin/perl -w 2 3use Test::More; 4require "t/lib/test_account.pl"; 5 6my($login, $password) = test_account_or_skip(); 7plan tests => 3; 8 9use_ok 'Business::OnlinePayment'; 10 11my $tx = Business::OnlinePayment->new("AuthorizeNet"); 12$tx->server('test.authorize.net'); 13$tx->content( 14 type => 'VISA', 15 login => $login, 16 password => $password, 17 action => 'Normal Authorization', 18 description => 'Business::OnlinePayment visa test', 19 amount => '49.95', 20 invoice_number => '100100', 21 customer_id => 'jsk', 22 first_name => 'Tofu', 23 last_name => 'Beast', 24 address => '123 Anystreet', 25 city => 'Anywhere', 26 state => 'UT', 27 zip => '84058', 28 card_number => '4007000000027', 29 expiration => 'BADFORMAT', #expiration_date(), 30); 31$tx->test_transaction(1); # test, dont really charge 32$tx->submit(); 33 34ok(!$tx->is_success); 35 36ok($tx->error_message() =~ /The format of the date submitted was incorrect/ ); 37