Vend::Payment::NetBilling $Revision: 1.6 $
&charge=netbilling
or
[charge route=netbilling param1=value1 param2=value2]
LWP::UserAgent
LWP::Protocol::https
Digest::MD5
All of these need be present and working.
The Vend::Payment::NetBilling module implements the netbilling() routine
for use with Interchange. It is compatible on a call level with the other
Interchange payment modules. In theory (and even usually in practice) you
could switch from another payment module to NetBilling with a few
configuration file changes.
To enable this module, place this directive in your
"interchange.cfg" file:
Require module Vend::Payment::NetBilling
This must be in interchange.cfg or a file included from
it.
Make sure CreditCardAuto is off which is the default in the
Standard ecommerce demo.
The mode can be named anything, but the
"gateway" parameter must be set to
"netbilling". To make it the default
payment gateway for all credit card transactions in a specific catalog, you
can set in "catalog.cfg":
Variable MV_PAYMENT_MODE netbilling
Vend::Payment::NetBilling uses several of the standard settings from Interchange
payment. Any time we speak of a setting, it is obtained either first from the
tag/call options, then from an Interchange order Route named for the mode,
then finally a default global payment variable, For example, the
"id" parameter would be specified by:
[charge route=netbilling id=YourNetBillingID]
or
Route netbilling id YourNetBillingID
or
Variable MV_PAYMENT_ID YourNetBillingID
- amount
- Amount for the transaction. Defaults to the checkout total after all
shipping, taxes discounts, and other levies have been applied.
- getid
- The path to the getid script on the NetBilling secure server. Defaults to
"/gw/native/getid1.0".
- host
- The domain name of the NetBilling secure server. Defaults to
"secure.netbilling.com".
- id
- This is your account and sitetag separated by a colon (ACCOUNT:SITETAG).
ACCOUNT is the number of your Netbilling merchant or agent account, as a
12-character string. Required for ALL transactions. SITETAG is the site
tag of your website configured in the Netbilling system. Required for
membership transactions, optional for others. Global parameter is
MV_PAYMENT_ID.
- poll
- The path to the poll script on the NetBilling secure server. Defaults to
"/gw/native/poll1.0".
- port
- The port to connect to on the NetBilling secure server. Defaults to the
standard https port (443).
- remap
- This remaps the form variable names to the ones needed by NetBilling.
- remote_host
- Hostname of customer for NetBilling to record for this transaction.
Defaults to the session remote host.
- remote_ip
- IP address of customer for NetBilling to record for this transaction.
Defaults to the session IP.
- retries
- Number of times to attempt a connection to the NetBilling secure server
before giving up. Defaults to 3.
- script
- The path to the NetBilling direct mode 2.1 script on the NetBilling secure
server. Defaults to "/gw/native/direct2.1".
- secret
- Your NetBilling Order Integrity Key, set in the NetBilling admin interface
in step 11 of 'Fraud Defense'. Global parameter is MV_PAYMENT_SECRET.
- trans_id
- Netbilling Transaction ID returned from a previous transaction. Used for
'REFUND' type transactions, the amount of the refund/Void and other
relevant data will be taken from the original transaction data.
- transaction
- The type of transaction to be run. Valid values are:
Interchange NetBilling
----------- ----------
avs AVS Address verification only, no charges
auth AUTH Pre-Auth a charge card for later capture
return CREDIT Credit the charge/ACH account instead of charging it
reverse REFUND Will attempt a VOID or a Refund of a previous 'SALE'
sale SALE Standard charge/ACH transaction
settle CAPTURE Capture a Pre-Authed charge
void REFUND Will attempt a VOID or a Refund of a previous 'SALE'
abort ABORT Will abort a pending capture
The "reverse" and "void" transactions are
both sent as a "REFUND" because NetBilling determines
internally whether to "VOID" or "REFUND" based on if
the original transaction has been batched out yet. The default is
"sale".
- type
- The payment type. Set to "K" or any string with the word
"check" in it for online checking. Any other value for charge.
If left unset or blank will default to the "mv_order_profile"
form value or CGI variable which can be "remap"ped to a
different actual form name (see
"remap"). If everything is blank this
defaults to charge.
Values can be obtained either from processed or raw CGI values. The CGI names
can be "remap"ped with the "remap"
setting above in case your form names are different.
- address1
- Customer's shipping street address and also the default for
b_address1.
- auth_code
- Force code provided by credit card processor. Optional.
- b_address1
- Customer's billing street address. Required for address verification.
Defaults to address1.
- b_city
- Customer's billing city. Required for address verification. Defaults to
city.
- b_country
- Customer's billing country. Required for address verification. Defaults to
country.
- b_fname
- Customer's billing first name. Required for address verification. Defaults
to fname.
- b_lname
- Customer's billing last name. Required for address verification. Defaults
to lname.
- b_state
- Customer's billing state/province. Required for address verification.
Defaults to state.
- b_zip
- Customer's billing zip/postal code. Required for address verification.
Defaults to zip.
- check_account
- Checking account number. Required for ACH transactions.
- check_dl
- Optional driver's license number field, but necessary for proper online
check fraud screening. In any case, only ONE of SSN, DL or TAXID will be
used if provided, in that order of preference.
- check_dl_state
- The two-character postal code for the state the ID was issued in. Leave
blank if inappropriate, for instance, when using SSN.
- check_number
- An optional check sequence number, provided by the customer.
- check_routing
- Checking account routing code. Required for ACH transactions.
- check_ssn
- Optional social security number field, but necessary for proper online
check fraud screening. In any case, only ONE of SSN, DL or TAXID will be
used if provided, in that order of preference.
- check_taxid
- Optional tax id number field, but necessary for proper online check fraud
screening. In any case, only ONE of SSN, DL or TAXID will be used if
provided, in that order of preference.
- city
- Customer's shipping city and also the default for b_city.
- comment1
- Additional miscellaneous info to accompany the transaction, up to 4000
characters.
- country
- Customer's shipping country and also the default for b_country.
- email
- Customer's email address. Required for address verification.
- fname
- Customer's first name for shipping and also the default for b_fname.
- item_desc
- An optional description of the product or services paid for. Up to 4000
characters. Defaults to a summary of the shopping cart contents.
- lname
- Customer's last name for shipping and also the default for b_lname.
- mv_credit_card_cvv2
- Credit Card CVV2 value. This is the three or four digit code on the back
of the customer's credit card. Optional, but often will get a lower rate
on the transaction.
- mv_credit_card_exp_month
- The month of expiration as a two digit number.
- mv_credit_card_exp_year
- The year of expiration as a two digit number. This can accept a four digit
number in which case the first two digits will be discarded.
- mv_credit_card_number
- Credit Card Account Number -- required for Credit Card transactions.
- mv_order_number
- The number Interchange assigns to this order. This gets stored as user
data in the transaction. This will only come from processed values, not
raw values but it does default to the mv_order_number in session
space.
- phone_day
- Stored as the customer phone number for the transaction and required for
address verification.
- state
- Customer's shipping state and also the default for b_state.
- zip
- Customer's shipping zip and also the default for b_zip.
In order to run a test transaction in NetBilling use the testing credit card
number set in the Setup/Account Config/Credit Cards section of the NetBilling
admin interface.
If nothing works:
- Make sure you "Require"d the module in interchange.cfg:
Require module Vend::Payment::NetBilling
- Make sure LWP::UserAgent LWP::Protocol::https and Digest::MD5 are
installed and working. You can test to see whether your Perl thinks they
are:
perl -MLWP::UserAgent -MLWP::Protocol::https -MDigest::MD5 -e 'print "It works\n"'
If it prints "It works." and returns to the prompt
you should be OK (presuming they are in working order otherwise).
- Check the error logs, both catalog and global.
- Make sure you set your payment parameters properly.
- Try an order, then put this code in a page:
<XMP>
[calc]
my $string = $Tag->uneval( { ref => $Session->{payment_result} });
$string =~ s/{/{\n/;
$string =~ s/,/,\n/g;
return $string;
[/calc]
</XMP>
That should show what happened.
- If all else fails, consultants are available to help with integration for
a fee.
There is actually nothing *in* Vend::Payment::NetBilling. It changes packages to
Vend::Payment and places things there.
You cannot randomly pick a transaction ID for NetBilling's Direct
Mode. The ID must be assigned from NetBilling. It should either be left
blank or a guaranteed unused ID can be retrieved from NetBilling prior to
issuing the transaction. This module will overwrite any transaction ID
supplied it with the one assigned by NetBilling.
Mark Stosberg <mark@summersault.com>, based on original code by Mike Heins
<mike@perusion.com>. Modified from the AuthorizeNet.pm module for
NetBilling and later rewritten by Peter Ajamian
<peter@pajamian.dhs.org>.
Jeff Nappi <brage@cyberhighway.net>
Paul Delys <paul@gi.alaska.edu>
webmaster@nameastar.net
Ray Desjardins <ray@dfwmicrotech.com>
Nelson H. Ferrari <nferrari@ccsc.com>
NetBilling Direct Mode 2.1 documentation is found at:
http://netbilling.com/direct/direct2.html