本文发表在 rolia.net 枫下论坛My questions:
1. How to realize the transaction through Internet.
2. As I know, some small company use a third company(for example: Wordpay ) to do the payment online. Do you guys know how it works?
3. As a small company , can I get the money directly from Visa, Master or etc.
I am a beginner and blind in this area, so ask all the experts for help.
function isValidCardNumber(strNum)
{
var nCheck = 0;
var nDigit = 0;
var bEven = false;
var dLength = 0;
var checkOk = false;
strNum = strNum.replace(/ /g,"");
dLength = strNum.length;
if (strNum.substring(0,1) == '4')
{
if (dLength == 13 || dLength == 16)
checkOk = true;
else
return false;
}
else if (strNum.substring(0,2) == '34' || strNum.substring(0,2) == '37')
{
if (dLength == 15)
checkOk = true;
else
return false;
}
else if (strNum.substring(0,2) == '51' || strNum.substring(0,2) == '52'
|| strNum.substring(0,2) == '53' || strNum.substring(0,2) == '54'
|| strNum.substring(0,2) == '55')
{
if (dLength == 16)
checkOk = true;
else
return false;
}
else
return false;
for (n = strNum.length - 1; n >= 0; n--)
{
var cDigit = strNum.charAt (n);
if (isDigit (cDigit))
{
var nDigit = parseInt(cDigit, 10);
if (bEven)
{
if ((nDigit *= 2) > 9)
nDigit -= 9;
}
nCheck += nDigit;
bEven = ! bEven;
}
else if (cDigit != ' ' && cDigit != '.' && cDigit != '-')
{
return false;
}
}
return (nCheck % 10) == 0;
}更多精彩文章及讨论,请光临枫下论坛 rolia.net
1. How to realize the transaction through Internet.
2. As I know, some small company use a third company(for example: Wordpay ) to do the payment online. Do you guys know how it works?
3. As a small company , can I get the money directly from Visa, Master or etc.
I am a beginner and blind in this area, so ask all the experts for help.
function isValidCardNumber(strNum)
{
var nCheck = 0;
var nDigit = 0;
var bEven = false;
var dLength = 0;
var checkOk = false;
strNum = strNum.replace(/ /g,"");
dLength = strNum.length;
if (strNum.substring(0,1) == '4')
{
if (dLength == 13 || dLength == 16)
checkOk = true;
else
return false;
}
else if (strNum.substring(0,2) == '34' || strNum.substring(0,2) == '37')
{
if (dLength == 15)
checkOk = true;
else
return false;
}
else if (strNum.substring(0,2) == '51' || strNum.substring(0,2) == '52'
|| strNum.substring(0,2) == '53' || strNum.substring(0,2) == '54'
|| strNum.substring(0,2) == '55')
{
if (dLength == 16)
checkOk = true;
else
return false;
}
else
return false;
for (n = strNum.length - 1; n >= 0; n--)
{
var cDigit = strNum.charAt (n);
if (isDigit (cDigit))
{
var nDigit = parseInt(cDigit, 10);
if (bEven)
{
if ((nDigit *= 2) > 9)
nDigit -= 9;
}
nCheck += nDigit;
bEven = ! bEven;
}
else if (cDigit != ' ' && cDigit != '.' && cDigit != '-')
{
return false;
}
}
return (nCheck % 10) == 0;
}更多精彩文章及讨论,请光临枫下论坛 rolia.net