.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "viaKLIX 3pm" .TH viaKLIX 3pm "2018-08-26" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Business::OnlinePayment::viaKLIX \- viaKLIX backend for Business::OnlinePayment .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Business::OnlinePayment; \& \& my $tx = new Business::OnlinePayment( \& \*(AqviaKLIX\*(Aq, \*(Aqdefault_ssl_user_id\*(Aq => \*(Aqwebuser\*(Aq, \& ); \& \& # See the module documentation for details of content() \& $tx\->content( \& type => \*(AqCC\*(Aq, \& action => \*(AqNormal Authorization\*(Aq, \& description => \*(AqBusiness::OnlinePayment::viaKLIX test\*(Aq, \& amount => \*(Aq49.95\*(Aq, \& invoice_number => \*(Aq100100\*(Aq, \& customer_id => \*(Aqjef\*(Aq, \& name => \*(AqJeff Finucane\*(Aq, \& address => \*(Aq123 Anystreet\*(Aq, \& city => \*(AqAnywhere\*(Aq, \& state => \*(AqGA\*(Aq, \& zip => \*(Aq30004\*(Aq, \& email => \*(Aqviaklix@weasellips.com\*(Aq, \& card_number => \*(Aq4111111111111111\*(Aq, \& expiration => \*(Aq12/09\*(Aq, \& cvv2 => \*(Aq123\*(Aq, \& order_number => \*(Aqstring\*(Aq, \& ); \& \& $tx\->submit(); \& \& if ( $tx\->is_success() ) { \& print( \& "Card processed successfully: ", $tx\->authorization, "\en", \& "order number: ", $tx\->order_number, "\en", \& "CVV2 response: ", $tx\->cvv2_response, "\en", \& "AVS code: ", $tx\->avs_code, "\en", \& ); \& } \& else { \& print( \& "Card was rejected: ", $tx\->error_message, "\en", \& "order number: ", $tx\->order_number, "\en", \& ); \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is a back end driver that implements the interface specified by Business::OnlinePayment to support payment handling via viaKLIX's Internet payment solution. .PP See Business::OnlinePayment for details on the interface this modules supports. .SH "Standard methods" .IX Header "Standard methods" .IP "\fIset_defaults()\fR" 4 .IX Item "set_defaults()" This method sets the 'server' attribute to 'www.viaklix.com' and the port attribute to '443'. This method also sets up the \&\*(L"Module specific methods\*(R" described below. .IP "\fIsubmit()\fR" 4 .IX Item "submit()" .SH "Unofficial methods" .IX Header "Unofficial methods" This module provides the following methods which are not officially part of the standard Business::OnlinePayment interface (as of 3.00_06) but are nevertheless supported by multiple gateways modules and expected to be standardized soon: .IP "\fIorder_number()\fR" 4 .IX Item "order_number()" .PD 0 .IP "\fIavs_code()\fR" 4 .IX Item "avs_code()" .IP "\fIcvv2_response()\fR" 4 .IX Item "cvv2_response()" .PD .SH "Module specific methods" .IX Header "Module specific methods" This module provides the following methods which are not currently part of the standard Business::OnlinePayment interface: .IP "\fIexpdate_mmyy()\fR" 4 .IX Item "expdate_mmyy()" .PD 0 .IP "\fIdebug()\fR" 4 .IX Item "debug()" .PD .SH "Settings" .IX Header "Settings" The following default settings exist: .IP "server" 4 .IX Item "server" www.viaklix.com .IP "port" 4 .IX Item "port" 443 .IP "path" 4 .IX Item "path" /process.asp .SH "Parameters passed to constructor" .IX Header "Parameters passed to constructor" If any of the key/value pairs passed to the constructor have a key beginning with \*(L"default_\*(R" then those values are passed to viaKLIX as a the corresponding form field (without the \*(L"default_\*(R") whenever content(%content) lacks that key. .SH "Handling of content(%content)" .IX Header "Handling of content(%content)" The following rules apply to content(%content) data: .SS "type" .IX Subsection "type" If 'type' matches one of the following keys it is replaced by the right hand side value: .PP .Vb 4 \& \*(Aqvisa\*(Aq => \*(AqCC\*(Aq, \& \*(Aqmastercard\*(Aq => \*(AqCC\*(Aq, \& \*(Aqamerican express\*(Aq => \*(AqCC\*(Aq, \& \*(Aqdiscover\*(Aq => \*(AqCC\*(Aq, .Ve .PP The value of 'type' is used to set \fItransaction_type()\fR. Currently this module only supports the above values. .SH "Setting viaKLIX parameters from content(%content)" .IX Header "Setting viaKLIX parameters from content(%content)" The following rules are applied to map data to viaKLIX parameters from content(%content): .PP .Vb 3 \& # viaKLIX param => $content{} \& ssl_merchant_id => \*(Aqlogin\*(Aq, \& ssl_pin => \*(Aqpassword\*(Aq, \& \& ssl_amount => \*(Aqamount\*(Aq, \& ssl_card_number => \*(Aqcard_number\*(Aq, \& ssl_exp_date => \e( $month.$year ), # MM/YY from \*(Aqexpiration\*(Aq \& ssl_cvv2 => \*(Aqpresent\*(Aq whenever cvv2 data is provided \& ssl_cvv2cvc2 => \*(Aqcvv2\*(Aq, \& ssl_description => \*(Aqdescription\*(Aq, \& ssl_invoice_number=> \*(Aqinvoice_number\*(Aq, \& ssl_customer_code => \*(Aqcustomer_id\*(Aq, \& \& ssl_first_name => \*(Aqfirst_name\*(Aq, \& ssl_last_name => \*(Aqlast_name\*(Aq, \& ssl_avs_address => \*(Aqaddress\*(Aq, \& ssl_city => \*(Aqcity\*(Aq, \& ssl_state => \*(Aqstate\*(Aq, \& ssl_zip => \e$zip, # \*(Aqzip\*(Aq with non\-alphanumerics removed \& ssl_country => \*(Aqcountry\*(Aq, \& ssl_phone => \*(Aqphone\*(Aq, \& ssl_email => \*(Aqemail\*(Aq, \& \& CardHolderName => \*(Aqname\*(Aq, \& CustomerName => \*(Aqaccount_name\*(Aq, .Ve .SH "Mapping viaKLIX transaction responses to object methods" .IX Header "Mapping viaKLIX transaction responses to object methods" The following methods provides access to the transaction response data resulting from a viaKLIX request (after \fIsubmit()\fR) is called: .SS "\fIorder_number()\fP" .IX Subsection "order_number()" This \fIorder_number()\fR method returns the ssl_txn_id field for card transactions to uniquely identify the transaction. .SS "\fIresult_code()\fP" .IX Subsection "result_code()" The \fIresult_code()\fR method returns the ssl_result field for card transactions. It is the numeric return code indicating the outcome of the attempted transaction. .SS "\fIerror_message()\fP" .IX Subsection "error_message()" The \fIerror_message()\fR method returns the ssl_result_message field for transactions. This provides more details about the transaction result. .SS "\fIauthorization()\fP" .IX Subsection "authorization()" The \fIauthorization()\fR method returns the ssl_approval_code field, which is the approval code obtained from the card processing network. .SS "\fIavs_code()\fP" .IX Subsection "avs_code()" The \fIavs_code()\fR method returns the ssl_avs_response field from the transaction result. .SS "\fIcvv2_response()\fP" .IX Subsection "cvv2_response()" The \fIcvv2_response()\fR method returns the ssl_cvvw_response field, which is a response message returned with the transaction result. .SS "\fIexpdate_mmyy()\fP" .IX Subsection "expdate_mmyy()" The \fIexpdate_mmyy()\fR method takes a single scalar argument (typically the value in \f(CW$content\fR{expiration}) and attempts to parse and format and put the date in \s-1MMYY\s0 format as required by PayflowPro specification. If unable to parse the expiration date simply leave it as is and let the PayflowPro system attempt to handle it as-is. .SS "\fIdebug()\fP" .IX Subsection "debug()" Enable or disble debugging. The value specified here will also set \&\f(CW$Business::OnlinePayment::HTTPS::DEBUG\fR in \fIsubmit()\fR to aid in troubleshooting problems. .SH "COMPATIBILITY" .IX Header "COMPATIBILITY" This module implements an interface to the viaKLIX \s-1API\s0 version 2.0 .SH "AUTHORS" .IX Header "AUTHORS" Jeff Finucane .PP Based on Business::OnlinePayment::PayflowPro written by Ivan Kohler and Phil Lobbes. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), Business::OnlinePayment, Carp, and the Developer Guide to the viaKLIX Virtual Terminal.