From 2bdce7b0c9d7468d676ee4bfa824b1fb0cbba207 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 14 Jan 2003 05:52:12 +0000 Subject: initial import --- t/credit_card.t | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 t/credit_card.t (limited to 't/credit_card.t') diff --git a/t/credit_card.t b/t/credit_card.t new file mode 100644 index 0000000..e0ce71c --- /dev/null +++ b/t/credit_card.t @@ -0,0 +1,42 @@ +BEGIN { $| = 1; print "1..2\n"; } + +use Business::OnlinePayment; + +my $tx = new Business::OnlinePayment("PayflowPro", +# 'storename' => '000000', +# 'keyfile' => '/path/to/cert.pem', +# 'lbin' => '/path/to/lbin', +# 'tmp' => '/path/to/secure/tempdir', +); + +$tx->content( + type => 'VISA', + action => 'Normal Authorization', + description => 'Business::OnlinePayment::PayflowPro visa test', + amount => '0.01', + first_name => 'Tofu', + last_name => 'Beast', + address => '123 Anystreet', + city => 'Anywhere', + state => 'UT', + zip => '84058', + country => 'US', + email => 'ivan-payflowpro@420.am', + card_number => '4007000000027', + expiration => '12/2003', +); + +$tx->test_transaction(1); + +$tx->submit(); + +if($tx->is_success()) { + print "ok 1\n"; + $auth = $tx->authorization; + warn "********* $auth ***********\n"; +} else { + print "not ok 1\n"; + warn '***** '. $tx->error_message. " *****\n"; + exit; +} + -- cgit v1.2.1