initial import
[Business-OnlinePayment-IPaymentTPG.git] / t / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 #testing/testing is valid and seems to work...
4 #print "ok 1 # Skipped: need a valid iPayment login/password to test\n"; exit;
5
6 use Business::OnlinePayment;
7
8 my $tx = new Business::OnlinePayment("IPaymentTPG");
9 $tx->content(
10     login          => 'testing',  #CHANGE THESE TO TEST
11     password       => 'testing',  #
12     type           => 'VISA',
13     action         => 'Normal Authorization',
14     description    => 'Business::OnlinePayment visa test',
15     amount         => '49.95',
16     invoice_number => '100100',
17     customer_id    => 'jsk',
18     first_name     => 'Tofu',
19     last_name      => 'Beast',
20     address        => '123 Anystreet',
21     city           => 'Anywhere',
22     state          => 'UT',
23     zip            => '84058',
24     card_number    => '4007000000027',
25     expiration     => '08/06',
26 );
27 $tx->test_transaction(1); # test, dont really charge
28 $tx->submit();
29
30 if($tx->is_success()) {
31     print "ok 1\n";
32 } else {
33     #warn $tx->error_message;
34     print "not ok 1\n";
35 }