Business::CCProcessor

Business::CCProcessor is a Perl module that can pass transaction off to secure processor.
Download

Business::CCProcessor Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hugh Esco
  • Publisher web site:
  • http://search.cpan.org/~hesco/Business-CCProcessor-0.09/lib/Business/CCProcessor.pm

Business::CCProcessor Tags


Business::CCProcessor Description

Business::CCProcessor is a Perl module that can pass transaction off to secure processor. Business::CCProcessor is a Perl module that can pass transaction off to secure processor.SYNOPSIS use Business::CCProcessor; use CGI::FormBuilder; # this is optional my $cc = Business::CCProcessor->new(); my ta = ( 'processor_settings' => %processor_settings, 'credit_card_owner' => %credit_card_owner, ); See below for details about how those two hash references ought to be structured. You may then create a button to include in a web page, like this: my $html_button = $cc->button_factory(ta); or use any one of the following three methods to get a hash of fields, you can use if you want some additional control over how the button is rendered. my $fields = $cc->verisign(ta); my $fields = $cc->dia(ta); my $fields = $cc->paypal(ta); The data in the $fields hashref can then be used to construct a web form submission button which will take a browser to the credit card forms for these providers. You might consider using CGI::FormBuilder, CGI, CGI::Simple or even hand rolled html fed to print statements, to then render the form with that data.At present this module and its methods are trivially simple in what they do, offering as its one service, the ability to hide how to munge your web form's data into a post call to a supported credit card processor.Business::CCProcessor will permit a script to collect non-financial data locally and then using an http POST call, hand that data off to a secure credit card processor which then collects the credit card parameters, and processes the transaction between the credit card owners account and the script owners account. This is a poor man's variant on Business::OnlinePayment for clients who cannot afford the video camera watched locked cages around their dedicated server, to collect credit card payments from their buyers or donors, in a real-time interaction with the credit card owner.This module is for you if you need to accept online credit card payments for your organization or services but are not prepared to invest in an ssl certificate, a dedicated IP address, a dedicated server and the monitored restricted access to your server which the privacy of your customers or donors requires.Initially this module offers five public methods: a constructor, a button_factory and methods for munging data for three (so far) credit card processors, but additional methods to handle additional credit card processors who permit this sort of interaction should be straight forward to add.Each of the credit card processor methods takes a reference to a hash of values which you will have to create before calling the method. This data is generally of the form: my ta = ( 'processor_settings' => %processor_settings, 'credit_card_owner' => %credit_card_owner, );The second part of the hash is fairly consistent across the methods, with some methods offering additional options for passing data than others, but generally, this hash looks like this: %credit_card_owner = ( 'fname' => '', 'lname' => '', 'addr1' => '', 'addr2' => '', 'city' => '', 'state' => '', 'postal_code' => '', 'comments' => '', 'comments1' => '', 'phone' => '', 'email' => '', 'employer' => '', 'occupation' => '', 'amount' => '', 'notes' => '', 'button_label' => '', );The %processor_settings hash's structure is dependent on which credit card processor method you are using.As this module develops, I anticipate also providing for a mode, to permit this module to be switched from 'commercial', to 'non-profit', to 'electoral_campaign' mode, to account for variances in how what data is collected for each of these types of users.my $cc = Business::CCProcessor->new();This method creates an object permitting access to the other methods provided by this module.The three public methods listed below each take a reference to a hash of data collected, cleaned and validated from a preceeding web form interaction and returns a hash of fields which can be used to construct a submission button which will POST that data to a web accessible credit card processor.my $html_button = $cc->button_factory(ta);By including the name of your credit card processor in the ta hash, as $data->{'processor_settings'}->{'processor'}, you can use the ->button_factory() method to access the magic of CGI::FormBuilder, and have returned to you a snippet of html code defining a Proceed_to_CC_Processor form button, ready for inclusion in a web page. The button will have encoded as hidden values, the data given to the method in its invocation, and that data should be handed off to the credit card processor, at least that data the processor is designed to handle.If you need any more control than that over the final form of your web form, you can use these following methods, which are invoked by the ->button_factory() method when doing its work.my %fields = $cc->verisign(ta);This method returns the fields necessary to process a payment with Verisign.The ta hash must include the following: %processor_settings = ( 'processor' => 'verisign', 'action' => '' # '' # '' # '' # dia(ta);This method returns the fields necessary to process a payment with Democracy In Action.The ta hash must include the following: %processor_settings = ( 'processor' => 'dia', 'action' => '' # '' #paypal(ta);This method returns the fields necessary to process a payment with Paypal.The ta hash must include the following: %processor_settings = ( 'processor' => 'paypal', 'action' => '' # '' # '' # '' # '' # '' # '' # Requirements: · Perl


Business::CCProcessor Related Software