Business::OnlinePayment::TransFirsteLink - Transfirst eLink backend for Business::OnlinePayment
use Business::OnlinePayment; my $tx = new Business::OnlinePayment( 'TransFirsteLink', 'merchantcustservnum' => "8005551212", ); # See the module documentation for details of content() $tx->content( type => 'CC', action => 'Normal Authorization', description => 'Business::OnlinePayment::TransFirsteLink test', amount => '49.95', invoice_number => '100100', customer_id => 'jef', name => 'Jeff Finucane', address => '123 Anystreet', city => 'Anywhere', state => 'GA', zip => '30004', email => 'transfirst@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 { my $info = ""; $info = " (CVV2 mismatch)" if ( $tx->result_code == 114 ); print( "Card was rejected: ", $tx->error_message, $info, "\n", "order number: ", $tx->order_number, "\n", ); }
This module is a back end driver that implements the interface specified by Business::OnlinePayment to support payment handling via TransFirst's eLink Internet payment solution.
See Business::OnlinePayment for details on the interface this modules supports.
This method sets the 'server' attribute to 'epaysecure1.transfirst.com' and the port attribute to '443'. This method also sets up the "Module specific methods" described below.
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:
This module provides the following methods which are not currently part of the standard Business::OnlinePayment interface:
The following default settings exist:
epaysecure1.transfirst.com
443
The following rules apply to content(%content) data:
If 'type' matches one of the following keys it is replaced by the right hand side value:
'visa' => 'CC', 'mastercard' => 'CC', 'american express' => 'CC', 'discover' => 'CC', 'check' => 'ECHECK',
The value of 'type' is used to set transaction_type(). Currently this module only supports the above values.
The following rules are applied to map data to TransFirst eLink parameters from content(%content):
# eLink param => $content{<key>} ePayAccountNum => 'login', Password => 'password', OrderNum => 'invoice_number', OrderNumber => 'invoice_number', TransactionAmount => 'amount', DollarAmount => 'amount', CardAccountNum => 'card_number', ExpirationDate => \( $month.$year ), # MM/YY from 'expiration' CVV2 => 'cvv2', RoutingNumber => 'routing_code', AccountNumber => \( $type eq 'CC' ? $card_number : $account_number ), CheckNumber => 'check_number', CardHolderName => 'name', CardHolderAddress => 'address', CardHolderCity => 'city', CardHolderState => 'state', CardHolderZip => \$zip, # 'zip' with non-alphanumerics removed CardHolderEmail => 'email', CardHolderPhone => 'phone', # with non-digits removed CardHolderCountry => 'country', CustomerName => 'name', CustomerAddress => 'address', CustomerCity => 'city', CustomerState => 'state', CustomerZip => \$zip, # 'zip' with non-alphanumerics removed CustomerEmail => 'email', CustomerPhone => 'phone', # with non-digits removed PaymentDescriptor => 'description',
The following methods provides access to the transaction response data resulting from a Payflow Pro request (after submit()) is called:
This order_number() method returns the ReferenceNum field for card transactions and TransactionId for check transactions to uniquely identify the transaction.
The result_code() method returns the Extended Transaction Status field for card transactions and the Result Code field for check transactions. It is the numeric return code indicating the outcome of the attempted transaction.
The error_message() method returns the Errors field for check transactions. This provides more details about the transaction result.
The authorization() method returns the Authorization Response Code field, which is the approval code obtained from the card processing network.
The avs_code() method returns the AVS Response Code field from the transaction result.
The cvv2_response() method returns the CVV2 Response Code field, which is a response message returned with the transaction result.
The expdate_mmyy() method takes a single scalar argument (typically the value in $content{expiration}) and attempts to parse and format and put the date in MMYY 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.
Enable or disble debugging. The value specified here will also set $Business::OnlinePayment::HTTPS::DEBUG in submit() to aid in troubleshooting problems.
This module implements an interface to the TransFirst eLink API version 3.4
Original author: Jeff Finucane
Current maintainer: Ivan Kohler <ivan-transfirst@freeside.biz>
Based on Business::OnlinePayment::PayflowPro written by Ivan Kohler and Phil Lobbes.
perl(1), Business::OnlinePayment, Carp, and the TransFirst e Payment Services Card Not Present eLink User Guide.
To install Business::OnlinePayment::TransFirsteLink, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::OnlinePayment::TransFirsteLink
CPAN shell
perl -MCPAN -e shell install Business::OnlinePayment::TransFirsteLink
For more information on module installation, please visit the detailed CPAN module installation guide.