summaryrefslogtreecommitdiff
path: root/t/bad_auth.t
diff options
context:
space:
mode:
authorivan <ivan>2007-05-02 01:32:31 +0000
committerivan <ivan>2007-05-02 01:32:31 +0000
commit196db498d6a75d4a772946049fbaee6b4700dd85 (patch)
tree15ed6a39999bdc05c0e3e021f313e97b1ea062ba /t/bad_auth.t
parentfc1c50ec369553974c7ea4cef4419003d41067ee (diff)
- Update for new test account.
- Add "cargs" argument including "-k" when in test mode. - Move tests from t2/ and have them actually work out of the box. - get rid of old Exporter / AutoLoader cruft - patch from Mark D. Anderson <mda@discerning.com>: - addrnum should be first digit string, not first word - avoid uninitialized variable warnings in lpperl due to webspace and debug - Map customer_ip, customer_id, invoice_number and description fields - Pass email, company, fax fields - Set lpperl debug if our $DEBUG is set - Better/supplimental download link for lpperl.pm
Diffstat (limited to 't/bad_auth.t')
-rw-r--r--t/bad_auth.t42
1 files changed, 42 insertions, 0 deletions
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;
+}
+