From eee2fc961434a73bf93bf42dae256961d31fa6b8 Mon Sep 17 00:00:00 2001 From: levinse Date: Tue, 7 Jun 2011 00:27:13 +0000 Subject: [PATCH] BOP Cardcom, RT13058 --- README | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++------- t/bop.t | 5 +++++ t/credit_card.t | 29 ++++++++++++++++++++++++++++ t/load.t | 5 +++++ 4 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 t/bop.t create mode 100644 t/credit_card.t create mode 100644 t/load.t diff --git a/README b/README index 340839e..2ce6d0f 100644 --- a/README +++ b/README @@ -1,13 +1,58 @@ -Copyright (c) 2011 Erik Levinson -All rights reserved. This program is free software; you can redistribute it -and/or modify it under the same terms as Perl itself. +Business-OnlinePayment-Cardcom -This is Business::OnlinePayment::Cardcom, an Business::OnlinePayment -backend module for the Cardcom gateway. It is only -useful if you have a merchant account with Cardcom: -http://www.cardcom.co.il +This is Business::OnlinePayment::Cardcom, a Business::OnlinePayment backend +module for the Cardcom gateway. It's useful only if you have a merchant account +with Cardcom (http://www.cardcom.co.il). Business::OnlinePayment is a generic interface for processing payments through online credit card processors, online check acceptance houses, etc. (If you like buzzwords, call it an "multiplatform ecommerce-enabling middleware solution"). + +INSTALLATION + +To install this module, run the following commands: + + perl Makefile.PL + make + make test + make install + +SUPPORT AND DOCUMENTATION + +After installing, you can find documentation for this module with the +perldoc command. + + perldoc Business::OnlinePayment::Cardcom + +You can also look for information at: + + RT, CPAN's request tracker + http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-OnlinePayment-Cardcom + + AnnoCPAN, Annotated CPAN documentation + http://annocpan.org/dist/Business-OnlinePayment-Cardcom + + CPAN Ratings + http://cpanratings.perl.org/d/Business-OnlinePayment-Cardcom + + Search CPAN + http://search.cpan.org/dist/Business-OnlinePayment-Cardcom + + +COPYRIGHT AND LICENCE + +Copyright (C) 2011 Freeside Internet Services, Inc. + +This program is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +ADVERTISEMENT + +Need a complete, open-source back-office and customer self-service solution? +The Freeside software includes support for credit card and electronic check +processing, integrated trouble ticketing, and customer signup and self-service +web interfaces. + +http://freeside.biz/freeside/ + diff --git a/t/bop.t b/t/bop.t new file mode 100644 index 0000000..64332c5 --- /dev/null +++ b/t/bop.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n"; } +END {print "not ok 1\n" unless $loaded;} +use Business::OnlinePayment; +$loaded = 1; +print "ok 1\n"; diff --git a/t/credit_card.t b/t/credit_card.t new file mode 100644 index 0000000..c9b6b13 --- /dev/null +++ b/t/credit_card.t @@ -0,0 +1,29 @@ +BEGIN { $| = 1; print "1..1\n"; } + +use Business::OnlinePayment; + +my $tx = new Business::OnlinePayment("Cardcom", terminalnumber => 1000); + +$Business::OnlinePayment::Cardcom::DEBUG = 2; + +$tx->content( + type => 'CC', + login => 'moot', + password => 'moot', + action => 'Normal Authorization', + amount => '0.80', + currency => 'CAD', + card_number => '4580000000000000', + expiration => '01/14', +); +$tx->test_transaction(1); # test, dont really charge +$tx->submit(); + +if($tx->is_success()) { + print "ok 1\n"; +} else { + warn $tx->server_response."\n"; + warn $tx->error_message. "\n"; + print "not ok 1\n"; +} + diff --git a/t/load.t b/t/load.t new file mode 100644 index 0000000..e73f15b --- /dev/null +++ b/t/load.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n";} +END {print "not ok 1\n" unless $loaded;} +use Business::OnlinePayment::Cardcom; +$loaded = 1; +print "ok 1\n"; -- 2.11.0