ERROR 1002
contact us
|
connect setup
|
connect settings
|
yourpay setup
|
test account
|
credit card logos
|
test credit cards
|
fraud prevention
|
payment modes
|
emails
|
hierarchy
|
frontpage
|
firefox
|
shopping carts
|
API
php api
|
com object api
|
coldfusion api
|
perl api
|
java api
|
sgs errors
|
errors
|
responses
|
xml examples
|
periodic
|
EXAMPLE CODE
buy now button
|
ebay
|
donation
|
recurring
|
drop down menu
|
payment
|
payplus
|
bypass
|
card validation
|
submit button
|
thankyou page
|
sorry page
|
FAQ
lp central
|
lp connect
|
vcheck
|
oscommerce
|
CART SETUP
agoracart
|
aspdotnet store
|
brightbuilders
|
clickcart pro
|
cart32
|
cubecart
|
herbalife
|
linkpoint cart
|
meridian1
|
miva merchant
|
monstercommerce
|
oscommerce
|
pricegrabber
|
prostores
|
quickcart
|
shopfactory
|
shopsite
|
snscart
|
storefront
|
treasure chest
|
virtuemart
|
x-cart
|
yahoo store
|
1and1 eshop
|
ONLINE WEB EDITOR
homestead
|
tripod
|
EXAMPLE FORMS
ebay
|
tickets
|
products
|
donations
|
recurring
|
bypass
|
CREDIT CARD VALIDATION
If you have a secure server (SSL certificate) on your web site and you are bypassing the Connect payment form, you can use this Javascript as a preliminary check for credit cards. The script will prevent the customer from being taken to a LinkPoint page if they enter an invalid credit card.
This script was obtained from
Javascript.com
Copy and paste the following code in between the HEAD tags on your HTML page.
Simply click inside the window below, use your cursor to highlight the code, and copy (press Control-C or Apple-C on your keyboard) the code. Next you will need to paste (Control-V or Apple-V on your keyboard) the code into one of your web pages using Notepad (Windows), TextEdit (Mac OS X), or any HTML editor.
<script language = "JavaScript"> <!-- // www.javascript.com // Credit Card Number Validator Sample Credit Card Validator Scipt // Date : 04/08/2004 // Uses Linh mod-10 formula to determine the validity and then // calls different functions to check what category the number belongs // to. //******************************************************************** !> var invalid = "Invalid"; //******************************************************************** // Check the Linh Mod-10 validity function CheckCreditCardNum(num) { var len=num.length; var first; var sum=0; var mul=1; var i; var numAtI; var tempSum; var theway; var txtcard; theway = ""; for(i=(len-1); i >= 0 ;--i) { numAtI = parseInt(num.charAt(i)); tempSum = numAtI * mul; theway += numAtI +" x " + mul +"=" + tempSum; if(tempSum > 9) { first = tempSum % 10; theway += " => "+ 1 +" + " + first +"="; tempSum = 1 + first; theway += tempSum +" "; } theway += "\n"; sum += tempSum; if (mul == 1) mul++; else mul--; } theway += "----------\nSum: "+ sum +"\n"; //********************************************************* // Comment this line if you want to see the calculation theway = ""; if(sum % 10) { if (len == 15) { txtcard = CheckFor15(num,0); if ( txtcard == invalid ) { alert(theway +"The number: "+ num +" is not valid!! "); return false; } } else { alert(theway +"The number: "+ num +" is not valid!! "); return false; } } { switch(len) { case 13: txtcard = CheckFor13(num); break; case 14: txtcard = CheckFor14(num); break; case 15: txtcard = CheckFor15(num,1); break; case 16: txtcard = CheckFor16(num); break; default: txtcard = invalid; } if(txtcard == invalid) { alert(theway +"The number: "+ num +" is not valid!! "); return false; } else theway+= "The number: "+ num +" is valid!! \nand it looks like it is: "+ txtcard; } //alert(theway); return true; } //*********************************************************************************** // Checks for Visa.. function CheckFor13(number) { if(parseInt(number.charAt(0)) == 4 ) return "Visa"; return invalid; } //************************************************************************************ // Check for Diners Club function CheckFor14(number) { if( parseInt(number.charAt(0)) != 3 ) return invalid; if( (parseInt(number.charAt(1)) == 6) || (parseInt(number.charAt(1)) == 8) ) return "Diners Club/Carte Blanche" if( !(parseInt(number.charAt(1)) )) if( (parseInt(number.charAt(2)) >= 0) && (parseInt(number.charAt(2)) <= 5)) return "Diners Club/Carte Blanche" return invalid; } //************************************************************************************ // Check for American Express, enRoute, JCB function CheckFor15(number, chec) { if ( (number.charAt(0) == 3) && ( (number.charAt(1) == 4)||(number.charAt(1) == 7) ) && chec) return "American Express"; var FirstFour = parseInt(number.charAt(0))*1000; FirstFour += parseInt(number.charAt(1))*100; FirstFour += parseInt(number.charAt(2))*10; FirstFour += parseInt(number.charAt(3)); //alert(FirstFour); if( (FirstFour == 2014) || (FirstFour == 2149) ) return "enRoute"; if( ((FirstFour == 2131) || (FirstFour == 1800)) && chec ) return "JCB"; return invalid; } //************************************************************************************ // Check for Visa, MasterCard, Discover or JCB function CheckFor16(number) { var a = parseInt(number.charAt(0)); var b = parseInt(number.charAt(1)); //alert (a); switch (a) { case 5: if((b > 0)&& (b < 6)) return "MasterCard"; else return invalid; break; case 4: return "Visa"; break; case 6: if ( (b == 0) && ( parseInt(number.charAt(2)) == 1) && ( parseInt(number.charAt(3)) == 1)) return "Discover"; else return invalid; break; case 3: return "JCB"; break; default: return invalid; break; } } </script>
STEP TWO:
Copy and paste the following periodic example after the opening (first) BODY tag of the HTML page.
Simply click inside the window below, use your cursor to highlight the code, and copy (press Control-C or Apple-C on your keyboard) the code. Next you will need to paste (Control-V or Apple-V on your keyboard) the code into one of your web pages using Notepad (Windows), TextEdit (Mac OS X), or any HTML editor.
<form name="order" action="https://www.linkpointcentral.com/lpc/servlet/lppay method="post"> Credit Card: <input type="text" name="cardnumber" value=""> <input type="submit" value="Submit" onclick="CheckCreditCardNum(order.cardnumber.value)"> </form>
Here is a working example:
Credit Card: