Validating a Credit Card Number Before Processing It
Validating a credit card is one of the most basic steps that an
ecommerce merchant should follow in order to avoid fraud. With Apache
and Ubuntu, it becomes easy to check the credit card number of a
The best way to check a card number is to do so locally. The further
the process goes from the local host the longer it takes to complete.
There are several online credit card validation services, but this
discussion will focus on using the Perl library's Business::CreditCard
module. If you need to install it, see "Installing Business::Credit
Card for Perl on Ubuntu".
Assuming the module is correctly installed, you need to import it.
For this guide, we will create a test to illustrate. In Perl, we
use Test::More tests => 1;
The first line prepares the test, the second imports the validation
We then create a subroutine and call it. It is called test_card_identification():
The credit card numbers are not real ones, but they should validate. If you have trouble with this code, you will need to brush up your Perl.
This module has three main subroutines:
validate(): returns 1 if the card number passes the checksum
test and 0 otherwise.
cardtype(): returns a string that contains the type of card:
"MasterCard", "VISA", etc. It is not a comprehensive list, but it is
generate_last_digit(): computes and returns the last digit of
the card given the preceding digits. So, with a 16-digit card, if
you provide the first 15 digits, the subroutine returns the
With this means of credit card number validation, you can verify card
numbers on-the-fly and so stop fraud at the first step in card
See "Credit Card
Processing Choices" for more on good credit card handling
processes and how to minimise fraud on your site.
Get Ubuntu Linux: Download, Request, or Order Ubuntu Ubuntu can be downloaded or ordered and is available in a couple of versions: 6.06 (Dapper Drake) and 7.04 (Feisty Fawn). Which you use depends on the software you need. This page shows you from where you can download, request, or buy Ubuntu.
Ubuntu vs Windows Vista Ubuntu had many Windows Vista features almost a year before Microsoft released it. Here is how Ubuntu compares to Windows Vista.
Resizing a Windows Installation Resizing a Windows installation is easy with the Ubuntu installer. Installing Ubuntu in parallel to a Windows installation is called 'dual booting' and is a good idea. Here is how to do it.
A Brief History of Ubuntu Ubuntu's history started with Debian GNU/Linux but has since outgrown it. Here is a brief look at Ubuntu's past and how things stand today.
Booting Windows Instead of Ubuntu by Default Grub boots Ubuntu by default. But if you want to make Windows your default operating system without losing Ubuntu, all you need do is change a number in Grub's configuration file. Here is how.
A Primer for Installing Ubuntu Installing Ubuntu should be as easy as possible, and the best guides for this are provided here at Easy Ubuntu Linux. But all the online resources in the world do not help you offline. For this reason, we are providing this PDF primer to help you install Ubuntu.
Image Handling With Ubuntu Ubuntu's image handling surpasses those of other operating systems. Whether you just need to look at your pictures or create first-rate graphics, Ubuntu offers a program to meet your needs.
Photo Editing With the GIMP Ubuntu comes with the GIMP already installed. Here is a brief tutorial on how to edit photos with the GIMP.
Configure Apache Web Server on Ubuntu Apache is a web server available for Ubuntu. With it you can serve web pages from a computer. Here is how to setup Apache as a web server on Ubuntu.
Apache Web Server Configuration on Ubuntu Apache on Ubuntu is a web server that enables you to serve web pages. How well those web pages are served depends on the configuration you use. Here is detailed information on the default configuration of the Apache web server on Ubuntu.
Reading the php.ini File from Ubuntu PHP is one of the web's main languages for development. Understanding how to configure PHP
allows you to create web pages
dynamically on Apache.
The Easy Ubuntu Blog Ubuntu is not always easy. But Easy Ubuntu Linux helps make it that way. Keep it easy with the Easy Ubuntu blog.
Installing a LAMP Server on Ubuntu A LAMP server is one of the most pervasive types of servers on the Internet, but many people find installing LAMP servers difficult. Here is how to install a LAMP server on Ubuntu.
Installing Samba on Ubuntu Samba is the main Ubuntu file sharing server. It allows you to share files with others from your computer. Here is how to use Ubuntu to share files with Samba.
Configuring Samba on Ubuntu I Samba is a file sharing server for Ubuntu Linux. It allows filesharing with others from your computer. This guide shows how to configure Samba on Ubuntu.
Configuring Samba on Ubuntu II Samba is a file sharing server for Ubuntu Linux. It allows filesharing with others from your computer. This is the second page of a guide that shows how to configure Samba on Ubuntu.
Configuring Samba on Ubuntu III: [globals] Samba is a file sharing server for Ubuntu Linux. The [globals] header is part of the Samba configuration file. This guide shows how to configure the [globals] section of the Samba configuration on Ubuntu.
Configuring Samba on Ubuntu IV: [homes] Samba is a file sharing server for Ubuntu Linux. The [homes] header is part of the Samba configuration file. This guide shows how to configure the [homes] section of the Samba configuration on Ubuntu.
Configuring Samba on Ubuntu V: [printers] Samba also functions as a printer managing server for Ubuntu Linux. The [printers] header is part of the Samba configuration file. This guide shows how to configure the [printers] section of the Samba configuration.
Resizing a Windows Installation: A Caution Resizing a Windows installation is easy with the Ubuntu installer. Installing Ubuntu in parallel to a Windows installation is called 'dual booting' and is a good idea. Here is how to do it.
Credit Card Validation Before Processing Processing credit cards is a fundamental process when you do ecommerce on Apache. Here we walk through some of the more common options for credit card processing on Ubuntu.
Credit Card Processing Choices Processing credit cards is a fundamental process when you do ecommerce on Apache. Here we walk through some of the more common options for credit card processing on Ubuntu.
Apache Web Hosting Apache is the main web server provided by web hosting companies. Here are recommendations on which Apache web hosting company to use for your Apache web host.
Linux Notebooks Linux notebooks are not as rare as they once were. It is nonetheless possible to buy a notebook and find that you cannot install Linux on it. Here is a series of guides for how to install Linux on different notebooks.
PCI DSS - What is PCI DSS PCI DSS is one of the most important elements of e-commerce. Even if you run your own credit card processing business, you would be forgiven for wondering 'What is PCI DSS?'. This cryptic abbreviation is explained here.
Sudoers - Registering Users in the Sudoers File Sudoers are those users who can gain administrative access to the system. Their names are listed in the sudoers file. Here is how to be so registered if your username is not in the sudoers file.
Sign Up for Gmail Sign up for Gmail and get several benefits for free. Here is how to sign up for Gmail for free.
Email Solutions on Ubuntu Linux Email solution on Linux vary according to how much control and accessibility you want to have. Here we see what is available
for email solutions under Ubuntu Linux.
Install Ubuntu 10.04 (Lucid Lynx) Install Ubuntu 10.04 (Lucid Lynx) with minimal fuss. Some choices in the installation process are better than others, and this installation guide will help you to install Ubuntu 10.04 (Lucid Lynx) with ease.
OpenOffice Writer OpenOffice Writer is the wordprocessing application of the OpenOffice office suite of productivity applications. Here are the basics of using OpenOffice Writer.
Unless otherwise stated, all material contained on this website is
copyrighted to Easy Ubuntu Linux.com. All rights are reserved. All
content is provided AS IS without any warranty of any kind for any
If you have a question or comment about Ubuntu or this site,
please send email to 'webmaster (at) easy-ubuntu-linux.com' (remove
single quotes and replace "@" for " (at) ").