<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex Cook</title>
	<atom:link href="http://aacook.co/feed" rel="self" type="application/rss+xml" />
	<link>http://aacook.co</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 02:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>User-Driven jQuery Credit Card Form Plugin</title>
		<link>http://aacook.co/jq-cc-plugin</link>
		<comments>http://aacook.co/jq-cc-plugin#comments</comments>
		<pubDate>Tue, 14 Jun 2011 01:21:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://aacook.co/?p=110</guid>
		<description><![CDATA[I recently studied and designed a cc form plugin for jquery. It&#8217;s open source &#8211; get the latest at github, download a zip here, or view it on the plugins.jquery.com site. Side note: I&#8217;m not sure if this should be called a jQuery plugin or a jQuery extension, or neither &#8211; so correct me if [...]]]></description>
			<content:encoded><![CDATA[<p>I recently studied and designed a cc form plugin for jquery. It&#8217;s open source &#8211; get the latest at <a href="https://github.com/aacook/jQuery-Credit-Card-Plugin">github</a>, download a <a href="https://github.com/aacook/jQuery-Credit-Card-Plugin/zipball/master">zip</a> here, or view it on the <a href="http://plugins.jquery.com/project/jq-cc-plugin">plugins.jquery.com</a> site.</p>
<p style="padding-left: 30px;"><span style="color: #808080;">Side note: I&#8217;m not sure if this should be called a jQuery plugin or a jQuery extension, or neither &#8211; so correct me if I&#8217;m wrong.  Either way, it uses jQuery and I hope people find it helpful.</span></p>
<h2><span style="font-weight: bold;">Design Process</span></h2>
<p>I chose to build it using the following features based on some classic PITA moments I&#8217;ve experienced with credit card forms, <a href="#pita">below</a>.  I also studied Google Checkout&#8217;s credit card form, as well as read this <a href="http://www.lukew.com/ff/entry.asp?968">really great blog post</a> about Apple&#8217;s checkout design.</p>
<h2><strong>Demo</strong></h2>
<p>Here&#8217;s a working demo.  Please don&#8217;t enter real credit card numbers since this page isn&#8217;t SSL encrypted.  You can generate test credit card numbers at <a href="http://sqa.fyicenter.com/Online_Test_Tools/Test_Credit_Card_Number_Generator.phpf">this site</a>, or you can use one of these <em>randomly generated </em>numbers:</p>
<pre style="padding-left: 30px;">American Express, 3705 9584 5057 067, 04/14
Discover, 6011 1111 1111 1117, 08/11
MasterCard, 5446 8823 7512 9691, 01/12</pre>
<div class="former">
			<form id="creditcardform"  method="POST" action="">
				<div class="textbox">
				    <div class="prompt">
				      	<div class="holding">        
				    		<input type="text" id="creditcard" name="creditcard" maxlength="21"/>               	        		              
				    	</div>  
					</div>		
					<div class="prompt">
						<div class="holding">
							&nbsp;Exp. Date&nbsp;
					        <input type="text" id="cardmonth" name="cardmonth" style="width: 32px" maxlength="2"/>         
							<input type="text" id="cardyear" name="cardyear" maxlength="2" style="width: 32px" />  </span>       
							<input type="text" id="cardsecurecode" name="cardsecurecode"  maxlength="4" style="width: 120px" />         
							&nbsp;&nbsp;&nbsp;<a href="https://checkout.google.com/support/bin/answer.py?answer=43073&hl=en_US" target="_blank">What's this?</a>
						</div>
					</div>
					
					<div class="prompt">
						<div class="holding ">        
							<input type="text" value="" id="cardnameon" name="cardnameon" />
						</div>
					</div>
					<div class="prompt">
						<div class="holding ">        
							<input type="text" value="" id="cardstreet" name="cardstreet"  />
						</div>
					</div>
				
					<div class="prompt">
						<div class="holding">        
							<input type="text" id="cardopt" name="cardopt" />        
				      </div>      
					</div>
					
					<div class="prompt">    	
						<div class="holding">  
				        	<input id="cardcity" name="cardcity" type="text" style="width: 230px;" />
					        <input id="cardstate" name="cardstate"  type="text" maxlength="2" style="width: 50px;" />
					        <input id="cardpostal" name="cardpostal" maxlength="10" type="text" style="width: 122px" />
				        </div>      
					</div>
					<div class="prompt">
						<input type="submit" class="submit" value="Submit" >
					</div>
				</div>	
			</form>
		</div>
<h2><strong>Features</strong></h2>
<h3><strong>Labels Inside Fields, iPhone style</strong></h3>
<h3><a href="http://aacook.co/wp-content/uploads/2011/06/labels-in-text-input.jpg"><img class="alignnone size-full wp-image-172" title="Labels inside Input Fields" src="http://aacook.co/wp-content/uploads/2011/06/labels-in-text-input.jpg" alt="Labels inside Input Fields" width="472" height="60" /></a></h3>
<p>The labels for each field are inside the field.  When you click in, the label doesn&#8217;t disappear until you start typing.</p>
<h3>Dynamic Card Type Indication</h3>
<p><a href="http://aacook.co/wp-content/uploads/2011/06/auto-select-card-type2.png"><img class="alignnone size-full wp-image-171" title="Automatically Select the Card Type" src="http://aacook.co/wp-content/uploads/2011/06/auto-select-card-type2.png" alt="Automatically Select the Card Type" width="452" height="57" /></a></p>
<p>There&#8217;s a simple algorithm you can use to determine a card number&#8217;s card type.  Therefore, users don&#8217;t need to select their credit card type from a drop down menu &#8211; you can do it for them, automatically.</p>
<h3><strong>Easy Expiration Date Entry</strong></h3>
<h3><a href="http://aacook.co/wp-content/uploads/2011/06/exp-date.png"><img class="alignnone size-full wp-image-173" title="Expiration Date Entry" src="http://aacook.co/wp-content/uploads/2011/06/exp-date.png" alt="Expiration Date Entry" width="198" height="62" /></a></h3>
<p>The user can enter &#8220;8&#8243;, and then they tab out it&#8217;ll format to &#8220;08&#8243;.  It&#8217;s personal preference, but I prefer input fields over drop down menus.  Usually you can type when you have a drop down menu selected, however &#8211; not all users are aware of this and use their mouse to select from the drop down menu.  Furthermore, that function doesn&#8217;t always function as anticipated.</p>
<h3><strong>Validation</strong></h3>
<ul>
<li>Checks to make sure it&#8217;s a valid card number &#8211; this happens on the front end, prior to the info being sent to the payment server</li>
<li>Checks to see if it&#8217;s a valid type of card offered</li>
<li>Checks to make sure the card isn&#8217;t expired</li>
<li>Makes sure each required field is filled out</li>
</ul>
<h2><strong>Download the plugin</strong></h2>
<p>You can download a <a href="https://github.com/aacook/jQuery-Credit-Card-Plugin/zipball/master">zip here</a>, get the latest on <a href="https://github.com/aacook/jQuery-Credit-Card-Plugin">github</a>, or get a copy from the <a href="http://plugins.jquery.com/project/jq-cc-plugin">plugins.jquery.com</a> site.<br />
<a name="pita"></a></p>
<h2><strong>Design Inspirations</strong></h2>
<p><strong> </strong><strong>PITA #1: We don&#8217;t Accept that Kind of Card</strong></p>
<p>I just entered my entire credit card, billing address, security code &#8211; and now you&#8217;re telling me you don&#8217;t take Amex? I know you have the logos there, but I didn&#8217;t see them.  Man, couldn&#8217;t you have told me before somehow?</p>
<p><strong>PITA #2: Select your Card Type<br />
</strong>Did you know that every single credit card in the world can be identified by its numbers based on the card type? Therefore, it&#8217;s literally not required to force you users to select their card type from a drop down menu</p>
<p><strong>PITA #3: January&#8230; February, March&#8230; December<br />
</strong>When was the last time you saw a card that said &#8220;August&#8221; on it?  Credit cards don&#8217;t have the months written out. The format is MM/YY&#8230; not August/2011.  So why the hell do I have to select August from a drop down menu? (As an aside, maybe there&#8217;s some security reason for it?).  I&#8217;m aware that some credit card gateways want a string for the card type (&#8220;Visa&#8221;, &#8220;Mastercard&#8221;), so maybe it&#8217;s sheer laziness of the developer/designer.</p>
<p><strong>Got a PITA you want to add?</strong> I&#8217;m only one person of many. Comment below and I&#8217;ll make sure to consider it for an update to the form.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://aacook.co/jq-cc-plugin/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

