<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using the Luhn algorithm to validate credit cards</title>
	<atom:link href="http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html</link>
	<description>Productive software development using ASP.NET, C#, Adobe Flex, and other technologies and tools.</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:52:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Andy best</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-1851</link>
		<dc:creator>Andy best</dc:creator>
		<pubDate>Mon, 23 May 2011 09:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-1851</guid>
		<description>I read and finally found granded resolution to my desire  but it was too much for me please try to indicate go to the right answer for us in stead off polongment</description>
		<content:encoded><![CDATA[<p>I read and finally found granded resolution to my desire  but it was too much for me please try to indicate go to the right answer for us in stead off polongment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Israel</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-1815</link>
		<dc:creator>Israel</dc:creator>
		<pubDate>Tue, 04 Jan 2011 11:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-1815</guid>
		<description>The shortest version I&#039;ve found, for Luhn check:


// Luhn algorithm validator, by Avraham Plotnitzky. (vzckakh at gmail)
String.prototype.luhnCheck = function()
{
	var luhnArr = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9], sum = 0;
	this.replace(/\D+/g,&quot;&quot;).replace(/[\d]/g, function(c, p1, offset){
			sum += ((offset.length-p1)%2)? parseInt(c) : luhnArr[parseInt(c)];
	});
	return (sum%10 == 0) &amp;&amp; (sum &gt; 0);
};</description>
		<content:encoded><![CDATA[<p>The shortest version I&#8217;ve found, for Luhn check:</p>
<p>// Luhn algorithm validator, by Avraham Plotnitzky. (vzckakh at gmail)<br />
String.prototype.luhnCheck = function()<br />
{<br />
	var luhnArr = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9], sum = 0;<br />
	this.replace(/\D+/g,&#8221;").replace(/[\d]/g, function(c, p1, offset){<br />
			sum += ((offset.length-p1)%2)? parseInt(c) : luhnArr[parseInt(c)];<br />
	});<br />
	return (sum%10 == 0) &amp;&amp; (sum &gt; 0);<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gabriel</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-1812</link>
		<dc:creator>gabriel</dc:creator>
		<pubDate>Thu, 23 Dec 2010 15:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-1812</guid>
		<description>i need a valid credit card number,expire date,cvv,i kindly beg,i will not use it for anything bad o crime.</description>
		<content:encoded><![CDATA[<p>i need a valid credit card number,expire date,cvv,i kindly beg,i will not use it for anything bad o crime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phygg</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-1729</link>
		<dc:creator>phygg</dc:creator>
		<pubDate>Tue, 11 May 2010 16:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-1729</guid>
		<description>I appreciate the other ways for validating credit cards you have posted.  But, I&#039;m in need of the regex versions that were written by the author whom originally posted, you know the &quot;inspiration&quot; for this blog post.
I&#039;m using regular expressions to filter email content.  they don&#039;t allow for other types of formatting or scripts.
Do you have the original post, i noticed that the link was broken.
Thanks
Phygg</description>
		<content:encoded><![CDATA[<p>I appreciate the other ways for validating credit cards you have posted.  But, I&#8217;m in need of the regex versions that were written by the author whom originally posted, you know the &#8220;inspiration&#8221; for this blog post.<br />
I&#8217;m using regular expressions to filter email content.  they don&#8217;t allow for other types of formatting or scripts.<br />
Do you have the original post, i noticed that the link was broken.<br />
Thanks<br />
Phygg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rad</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-1616</link>
		<dc:creator>Rad</dc:creator>
		<pubDate>Mon, 12 Oct 2009 18:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-1616</guid>
		<description>I&#039;ve always used 4111-1111-1111-1111 this is a valid visa test number..</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always used 4111-1111-1111-1111 this is a valid visa test number..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: superjason</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-754</link>
		<dc:creator>superjason</dc:creator>
		<pubDate>Tue, 21 Oct 2008 16:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-754</guid>
		<description>Johansen, talk to your merchant account. They can give you test credit card information. Or consult the API documentation for the merchant.</description>
		<content:encoded><![CDATA[<p>Johansen, talk to your merchant account. They can give you test credit card information. Or consult the API documentation for the merchant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johansen</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-753</link>
		<dc:creator>johansen</dc:creator>
		<pubDate>Tue, 21 Oct 2008 13:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-753</guid>
		<description>i need a valid credit card number,expire date,cvv,i kindly beg,i will not use it for anything bad o crime.</description>
		<content:encoded><![CDATA[<p>i need a valid credit card number,expire date,cvv,i kindly beg,i will not use it for anything bad o crime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Jorgensen</title>
		<link>http://www.ytechie.com/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html/comment-page-1#comment-78</link>
		<dc:creator>Greg Jorgensen</dc:creator>
		<pubDate>Wed, 16 Apr 2008 21:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://207.36.235.13/2008/04/using-the-luhn-algorithm-to-validate-credit-cards.html#comment-78</guid>
		<description>There are a couple of reasons I can think of to use a regex before or along with the Luhn validation: The regex checks can figure out what kind of card the number is from (Visa, Mastercard, AMEX, etc.), and it can make sure the card number is the correct length for the card type.&lt;br/&gt;&lt;br/&gt;If my ecommerce site doesn&#039;t accept Discover, for example, it&#039;s better to figure that out and tell the user. The number they entered may be a valid card number (it passes the Luhn check) but my payment processor doesn&#039;t let me accept it.&lt;br/&gt;&lt;br/&gt;Not all credit card numbers are the same length. It&#039;s possible for someone to enter a number that passes the Luhn test but is not a valid card number.&lt;br/&gt;&lt;br/&gt;Use regext + Luhn if you site isn&#039;t doing real-time credit card authorizations, or if your payment processor is slow, or penalizes you for attempting to auth a bad card number, or if you want to give my customers better messages about what went wrong.&lt;br/&gt;&lt;br/&gt;I have a long article about the Luhn algorithm and checking credit card numbers in Javascript &lt;a HREF=&quot;http://typicalprogrammer.com/category/javascript/&quot; REL=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>There are a couple of reasons I can think of to use a regex before or along with the Luhn validation: The regex checks can figure out what kind of card the number is from (Visa, Mastercard, AMEX, etc.), and it can make sure the card number is the correct length for the card type.</p>
<p>If my ecommerce site doesn&#8217;t accept Discover, for example, it&#8217;s better to figure that out and tell the user. The number they entered may be a valid card number (it passes the Luhn check) but my payment processor doesn&#8217;t let me accept it.</p>
<p>Not all credit card numbers are the same length. It&#8217;s possible for someone to enter a number that passes the Luhn test but is not a valid card number.</p>
<p>Use regext + Luhn if you site isn&#8217;t doing real-time credit card authorizations, or if your payment processor is slow, or penalizes you for attempting to auth a bad card number, or if you want to give my customers better messages about what went wrong.</p>
<p>I have a long article about the Luhn algorithm and checking credit card numbers in Javascript <a HREF="http://typicalprogrammer.com/category/javascript/" REL="nofollow" onclick="pageTracker._trackPageview('/outgoing/typicalprogrammer.com/category/javascript/?referer=');">here</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

