viaKLIX(3pm)
π viaKLIX π
okay bestie, so Business::OnlinePayment::viaKLIX is literally the viaKLIX backend for Business::OnlinePayment and I'm obsessed π«Ά it's a Perl module (that's the 3pm in the name, iykyk) and she handles your payment vibes through viaKLIX's Internet payment solution. no cap.
β¨ SYNOPSIS β¨
here's the whole main character moment, copied exactly so you can just paste and go:
use Business::OnlinePayment;
my $tx = new Business::OnlinePayment(
'viaKLIX', 'default_ssl_user_id' => 'webuser',
);
# See the module documentation for details of content()
$tx->content(
type => 'CC',
action => 'Normal Authorization',
description => 'Business::OnlinePayment::viaKLIX test',
amount => '49.95',
invoice_number => '100100',
customer_id => 'jef',
name => 'Jeff Finucane',
address => '123 Anystreet',
city => 'Anywhere',
state => 'GA',
zip => '30004',
email => 'viaklix@weasellips.com',
card_number => '4111111111111111',
expiration => '12/09',
cvv2 => '123',
order_number => 'string',
);
$tx->submit();
if ( $tx->is_success() ) {
print(
"Card processed successfully: ", $tx->authorization, "\n",
"order number: ", $tx->order_number, "\n",
"CVV2 response: ", $tx->cvv2_response, "\n",
"AVS code: ", $tx->avs_code, "\n",
);
}
else {
print(
"Card was rejected: ", $tx->error_message, "\n",
"order number: ", $tx->order_number, "\n",
);
}
πΈ DESCRIPTION πΈ
so this module is a back end driver π
like, it implements the interface that Business::OnlinePayment specifies, so you can do your payment handling through viaKLIX's Internet payment solution. it's giving middle-man but make it iconic.
and if you wanna know the deets of the interface this module supports, go read Business::OnlinePayment. she's the blueprint, fr fr.
π Standard methods π
set_defaults()β this one sets the'server'attribute to'www.viaklix.com'and the port attribute to'443'. oh and she also sets up the "Module specific methods" we're gonna talk about below. multitasking queen πsubmit()β (yes that's all it says, she's mysterious like that β¨)
π¦ Unofficial methods π¦
these methods are not officially part of the standard Business::OnlinePayment interface (as of 3.00_06) BUT bestie, multiple gateway modules support them and they're expected to be standardized soon. so they're like the cool underground ones:
order_number()avs_code()cvv2_response()
π Module specific methods π
and these ones are currently not part of the standard Business::OnlinePayment interface at all:
expdate_mmyy()debug()
π Settings π
the following default settings exist, no cap:
serverβwww.viaklix.comportβ443pathβ/process.asp
π« Parameters passed to constructor π«
okay so here's the vibe: if any of the key/value pairs you pass to the constructor have a key starting with "default_", then those values get passed to viaKLIX as the corresponding form field (without the "default_" part, obviously π
) whenever content(%content) is missing that key. it's the backup plan, the safety net, the ride-or-die π«Ά
π Handling of content(%content) π
the following rules apply to your content(%content) data:
π§ type
if 'type' matches one of these keys, it gets replaced by the right hand side value:
'visa' => 'CC',
'mastercard' => 'CC',
'american express' => 'CC',
'discover' => 'CC',
and the value of 'type' is used to set transaction_type(). heads up though: currently this module only supports the above values. that's it, that's the list π
π Setting viaKLIX parameters from content(%content) π
here's the mapping rules applied to get data into viaKLIX parameters:
# viaKLIX param => $content{<key>}
ssl_merchant_id => 'login',
ssl_pin => 'password',
ssl_amount => 'amount',
ssl_card_number => 'card_number',
ssl_exp_date => \( $month.$year ), # MM/YY from 'expiration'
ssl_cvv2 => 'present' whenever cvv2 data is provided
ssl_cvv2cvc2 => 'cvv2',
ssl_description => 'description',
ssl_invoice_number=> 'invoice_number',
ssl_customer_code => 'customer_id',
ssl_first_name => 'first_name',
ssl_last_name => 'last_name',
ssl_avs_address => 'address',
ssl_city => 'city',
ssl_state => 'state',
ssl_zip => \$zip, # 'zip' with non-alphanumerics removed
ssl_country => 'country',
ssl_phone => 'phone',
ssl_email => 'email',
CardHolderName => 'name',
CustomerName => 'account_name',
π Mapping viaKLIX transaction responses to object methods π
these methods give you access to the transaction response data that comes back from a viaKLIX request (after submit() gets called, obviously):
π order_number()
this method returns the ssl_txn_id field for card transactions, so you can uniquely identify the transaction. she's the β¨fingerprintβ¨ of your payment.
π result_code()
returns the ssl_result field for card transactions. it's the numeric return code that tells you how the attempted transaction turned out.
π error_message()
returns the ssl_result_message field for transactions. this one gives you more details about the transaction result, so when something goes sideways you actually know why π
π authorization()
returns the ssl_approval_code field, which is the approval code obtained from the card processing network. the receipt moment π
π avs_code()
returns the ssl_avs_response field from the transaction result.
π cvv2_response()
returns the ssl_cvvw_response field, which is a response message returned with the transaction result.
π expdate_mmyy()
this method takes a single scalar argument (typically the value in $content{expiration}) and tries to parse and format the date into MMYY format as required by PayflowPro specification. and if it can't parse the expiration date? she just leaves it as is and lets the PayflowPro system try to handle it as-is. not her problem, honestly π
π debug()
enable or disble debugging. (yes, that's how the original spells it, we keep it verbatim bestie π) the value you specify here will also set $Business::OnlinePayment::HTTPS::DEBUG in submit(), which helps you troubleshoot problems. detective mode π
π COMPATIBILITY π
this module implements an interface to the viaKLIX API version 2.0. periodt.
π AUTHORS π
- Jeff Finucane
<viaklix@weasellips.com> - based on
Business::OnlinePayment::PayflowProwritten by Ivan Kohler and Phil Lobbes.
π¦ SEE ALSO π¦
perl(1), Business::OnlinePayment, Carp, and the Developer Guide to the viaKLIX Virtual Terminal.
and that's the whole page bestie π this is from perl v5.36.0, dated 2022-12-10, and it's the viaKLIX(3pm) page under User Contributed Perl Documentation β go slay those payments β¨π«Ά
π¦ where this page comes from
- debian bookworm: libbusiness-onlinepayment-viaklix-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbusiness-onlinepayment-viaklix-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbusiness-onlinepayment-viaklix-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbusiness-onlinepayment-viaklix-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbusiness-onlinepayment-viaklix-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms