You are searching about Compare Different Types Of Server-Side And Client-Side Scripting Languages, today we will share with you article about Compare Different Types Of Server-Side And Client-Side Scripting Languages was compiled and edited by our team from many sources on the internet. Hope this article on the topic Compare Different Types Of Server-Side And Client-Side Scripting Languages is useful to you.
Credit Card Fraud Prevention Using PHP and MYSQL Database
Credit card fraud has become pervasive on the Internet. According to MasterCard International, account acquisition fraud has increased by 369% since 1995. It has become one of the fastest growing types of fraud, and one of the most difficult to combat. In 2001, more than $700 million in online sales were lost to fraud, representing 1.14 percent of total annual online sales of $61.8 billion, according to GartnerG2. Even if the credit card company has given permission regarding the validity of the card, there are many ways that fraudulent cards can be used on your site. The card may have been lost or stolen, but the owner of the card has not yet reported its loss. Or the number on the card (and not the card itself) may have been raised without the owner’s knowledge. There is also a scam called identity theft, where the card is issued under false pretenses using someone else’s identity and details.
As an online merchant, you need to have a system to verify the authenticity of the orders placed to safeguard your business. While the effort may require additional time and money, it can save you the cost and stress caused by chargebacks for fraudulent orders. You have lost your physical products; the sale price is lost; lose another business opportunity; and you will be fined an additional fee of $15-$50. If you have a high percentage of refunds, your card service company may also be blacklisted and cancel your merchant account. You may also spend time searching for the order and providing the requested information to your card services company. All of these hassles are things you can certainly do without.
How can you protect your business from credit card fraud? Here are a few steps that can be taken to ensure that the transaction was requested by the true cardholder.
Suspicious shipping address.
According to ClearCommerce Corporation, a provider of payment processing and fraud protection software for e-commerce, orders from Ukraine, Indonesia, Yugoslavia, Lithuania, Egypt, Romania, Bulgaria, Turkey, Russia and Pakistan have a very high incidence of fraud , and often. have unverifiable addresses.
Untraceable email address.
In many fraudulent orders, the customer’s email address is often in one of the free email services, such as hotmail.com and yahoo.com, which are relatively untraceable.
Beware of expensive orders, especially for expensive branded items.
It can be a bad sign, for example, if someone orders three X-Boxes or three DVD players at once, especially where the items have a high resale value.
Most fraudulent orders specify overnight or 1 day shipping without hesitation.
The shipping address differs from the billing address.
The point of receipt and the billing address are different in fraud orders. If you are selling valuable items, it may be a good policy to only ship to the cardholder’s billing address.
Suspicious billing address.
The address looks too simple or invalid. If the billing address is 123 Main St, New York, the order is probably fraud. You can use an online location tool to see if the address can be verified.
Leave it at the door or in the mailbox.
If the courier service cannot guarantee the delivery of goods, the risk of fraud is very high.
The advancement of geo-targeting on the Internet allows us to pinpoint the geographic region for an order. The information can be used to reduce fraud by checking with the billing address and delivery address. This method can identify the scenario where someone from country X has stolen credit card data from country Y. The IP address lookup service will reveal the real country instead of relying on the complete country in the form of order
IP2Location(TM) provides technology to translate the IP address into the country of origin. The lookup table is available in several formats such as database and COM. It is the perfect solution to automate fraud detection using client programming languages such as C++ & Visual Basic; or service programming languages such as ASP, PHP, JSP and CFML.
For example, the company XYZ received a credit card order from the IP address 18.104.22.168. The order details are as follows:
Name: John Ma
Address: 123 Main St
City: New York
Postal Code: 11111
Country: United States
Phone: (503) 111-1111
Credit Card No: 1234 5678 9012 3456
Expiry date: December 2010
The merchant’s credit card processor will authorize this order if the billing address matches the order details. Unfortunately, the credit card details were previously stolen by Mr. ABC from another country through the Internet. Later, he made a purchase of digital products from company XYZ using the information. His order approved by the merchant because all the details match John’s record in the bank’s database. IP2Location(TM) technology can filter the difference between the country of order and the country of record in advance to protect your business. You can classify this type of order for manual inspection before delivering the goods. You will be surprised how much this method will help you identify fraud orders.
In this tutorial, we use the IP2Location(TM) IP-Country database to look up the country of origin from the visitor’s IP address. Instead of loading the full database with 50000+ records, we can simplify this tutorial by assuming only two different IP address ranges in the world. IP addresses 0.0.0.0 – 22.214.171.124 come from the United States. Meanwhile, IP addresses 127.0.0.0 – 255.255.255.255 come from Japan. Here we have created an “IP2Location” database with the “IPCountry” table which consists of two IP address range records.
Step 1: Create and connect to the “IP2Location” database.
mysql> CREATE DATABASE IP2Location
mysql> CONNECT IP2Location
Step 2: Create the ‘IPCountry’ table
mysql> CREATE TABLE IPCountry
–> ipFROM DOUBLE NOT NULL,
–> ipTO DOUBLE NOT NULL,
–> countrySHORT VARCHAR (2) NOT NULL,
–> countryLONG VARCHAR (100) NOT NULL,
–> PRIMARY KEY (ipFROM, ipTO)
Step 3. Import the ‘ipcountry.csv’ database into the ‘IPCountry’ table
mysql> INSERT INTO IPCountry VALUES (0, 2130706431,’US’,’UNITED STATES’);
mysql> INSERT INTO IPCountry VALUES (2130706432, 4294967295,’JP’,’JAPAN’);
The full version of the IP-Country database is available by subscription at $49/year from http://ip2location.com. If you have the full version of the IP2Location(TM) IP-Country database, the import process is much easier using the LOAD DATA function available in MYSQL.
mysql> LOAD DATA INFILE “/IPCountry.csv” INTO TABLE IPCountry FIELDS TERMINATED BY ‘,’ ACCLUSED BY ‘”‘ LINES TERMINATED BY ‘r’;
Let’s create a script to compare the search country and the data given in the order authorization flow. It serves as a filter to reduce fraud. All rejected orders will be manually checked by merchants.
// Replace this MYSQL server variable with the current configuration
$mysql_server = “mysql_server.com”;
$mysql_user_name = “UserName”;
$mysql_user_pass = “Password”;
// Retrieve the visitor’s IP address from the REMOTE_ADDR server variable
$ipaddress = getenv(REMOTE_ADDR);
// Convert the IP address to the IP number for the database
$ipno = Dot2LongIP ( $ip address );
// Connect to the database server
$link = mysql_connect($mysql_server, $mysql_user_name, $mysql_user_pass)
or die(“Could not connect to MySQL database”);
// Connect to the IP2Location database
mysql_select_db(“IP2Location”) or die(“Could not select database”);
// SQL query string to match the recordset that
// the IP number falls between the valid range
$query = “SELECT * FROM IPCountry WHERE $ipno <= ipTO AND $ipno>=ipFROM”;
// Execute the SQL query
$result = mysql_query($query) or die(“IP2Location Query failed”);
// Retrieve the recordset (only one)
$row = mysql_fetch_object($result);
// Keep the country information in two different variables
$countrySHORT = $row->countrySHORT;
$countryLONG = $row->countryLONG;
// Free recordset and tight database connection
if ($countrySHORT == $billingCountrySHORT)
// IP address equal to the country in the billing address
// Low Risk Fraud
// IP address different from the country in the billing address
// High Risk of Fraud
// Function to convert IP address (xxx.xxx.xxx.xxx) to IP number (0 to 256^4-1)
function Dot2LongIP ($IPaddr)
if ($IPaddr == “”)
$ips = split(“.”, “$IPaddr”);
return ($ips + $ips * 256 + $ips * 256 * 256 + $ips * 256 * 256 * 256);
Video about Compare Different Types Of Server-Side And Client-Side Scripting Languages
You can see more content about Compare Different Types Of Server-Side And Client-Side Scripting Languages on our youtube channel: Click Here
Question about Compare Different Types Of Server-Side And Client-Side Scripting Languages
If you have any questions about Compare Different Types Of Server-Side And Client-Side Scripting Languages, please let us know, all your questions or suggestions will help us improve in the following articles!
The article Compare Different Types Of Server-Side And Client-Side Scripting Languages was compiled by me and my team from many sources. If you find the article Compare Different Types Of Server-Side And Client-Side Scripting Languages helpful to you, please support the team Like or Share!
Rate Articles Compare Different Types Of Server-Side And Client-Side Scripting Languages
Rate: 4-5 stars
Search keywords Compare Different Types Of Server-Side And Client-Side Scripting Languages
Compare Different Types Of Server-Side And Client-Side Scripting Languages
way Compare Different Types Of Server-Side And Client-Side Scripting Languages
tutorial Compare Different Types Of Server-Side And Client-Side Scripting Languages
Compare Different Types Of Server-Side And Client-Side Scripting Languages free
#Credit #Card #Fraud #Prevention #PHP #MYSQL #Database