<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>OnRails.org: An on-line store build with Ruby on Rails</title>
    <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Ruby On Rails and related matters.</description>
    <item>
      <title>An on-line store build with Ruby on Rails</title>
      <description>&lt;p&gt;In this non-technical article I wanted to share my impressions of writing an online store with Ruby on Rails. &lt;a href="http://www.autumnriderstees.com/"&gt;http://www.autumnriderstees.com/&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;Background&lt;/h2&gt;


	&lt;p&gt;On September 9th Lee&amp;#8217;s dad mentioned that he would receive a stock of new quality designer T-shirts with funny bikers logos on September the 22nd and asked Lee if he could setup an on-line store. Lee asked me if I could help out writing it in Ruby on Rails and if I thought it was feasible.  Hey, I just finished &amp;#8220;Agile Web  Development with Rails&amp;#8221;, how hard could it be, the book contains everything we need. So &amp;#8220;heck, yea, we can do it&amp;#8221;.  So Lee told his dad: &amp;#8220;Sure, we&amp;#8217;ll do&amp;#8221;.  Well, it took us just a little longer, not much thought, considering we just met once a week for a month, and two weekends. But considering that Lee just started a new Rails gig, me just being father for the second time and a little sleep depraved, we manage to go-life on October the 16th at RubyConf 2005.  First Ruby and Rails is really cool, Dave Thomas books are invaluable in many aspects, not the least being that the most of the order processing part of the application is taken straight from book.&lt;/p&gt;&lt;h2&gt;The application&lt;/h2&gt;


	&lt;p&gt;The application is composed of the Store and the Order processing application.
The Store allows selecting 4 T-shirt designs each in 5 sizes, to add the ones you like to shopping cart and finally go to a checkout page where shipping and billing information can be entered. Payment processing is done using the &lt;em&gt;payment&lt;/em&gt; ruby library that supports Authorize.net merchant accounts (that&amp;#8217;s just the one we needed and we go the credit card payment processing integrated in 10 minutes :-). All in all we built the most basic on-line store that one can build. Nowadays such a store can certainly be setup for a couple of dollars with yahoo and other providers. But the fun part was to do it and learn from that. Maybe if Shopify was open for business we wouldn&amp;#8217;t have tried to write our own on-line store&amp;#8230;but then again we wouldn&amp;#8217;t have learn as much.&lt;/p&gt;


	&lt;p&gt;There are many things that can be improved and we are already planning for next year to add support for more products, designs and configurations to support things like Mugs and Long-Sleeve Shirts. So there will quite some refactoring for the next iteration.&lt;/p&gt;


	&lt;h2&gt;The development process&lt;/h2&gt;


	&lt;p&gt;Well&amp;#8230;we where not too formal I believe, we used Basecamp to communicate ideas and create todos and then we just jumped in. Lee&amp;#8217;s approach is usually more &lt;em&gt;intellectual&lt;/em&gt; and he wants to get things pretty nicely laid-out before starting and I like to start and learn from what we discover and improve has we move along. Together we got a good mix. Lee&amp;#8217;s dad just wants to sell his t-shirts. Now regarding Basecamp, if first thought it would be &amp;#8220;overkill&amp;#8221; for such a small project but it&amp;#8217;s really a nice communication tool and helped us out getting organized without having to really think about it.&lt;/p&gt;


	&lt;h2&gt;The look and feel&lt;/h2&gt;


	&lt;p&gt;It&amp;#8217;s got to work well, but that doesn&amp;#8217;t matter if it&amp;#8217;s not looking good. It&amp;#8217;s got to look good. Well&amp;#8230;we are software programmers, software designers, software architects, but even thought I don&amp;#8217;t like to admit it, pretty lousy graphic designers. My first attempts to prototype the site gave a good feel of the structure and style&amp;#8230;but just didn&amp;#8217;t cut it. On the side for simple html work I use RapidWeaver, a cool tool on &lt;span class="caps"&gt;OSX&lt;/span&gt; to rapidly build html website of predefined types. This tool does a great job of separating content and style and provides a bunch of pretty nice html design that rely heavily on css. Well it took me about five minutes to get a pretty nice proto for the store using that tool and that&amp;#8217;s what we went with. The nice part is that is was pretty straight forward to change the static site into dynamic .rhtml pages. Layouts in Rails are just awesome. From an usability point of view, we still have one step to much as the cart and checkout page should really become one. For the next version, we will try to have it similar to the &lt;a href="http://panic.com/goods/"&gt;Panic&amp;#8217;s Good Store&lt;/a&gt;.&lt;/p&gt;


	&lt;h2&gt;DataModel&lt;/h2&gt;


	&lt;p&gt;The data model was fairly straight forward mostly consisting of an Order having many LineItem.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://static.flickr.com/28/66080832_e79e5f1198_m.jpg" alt="" /&gt; &lt;a href="http://www.flickr.com/photos/wanja/66080832/"&gt;show larger image&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;Architecture&lt;/h2&gt;


	&lt;p&gt;Although a file structure of an application doesn&amp;#8217;t depict an architecture, Ruby on Rails really provides a nice starting point for organizing your code in a clean &lt;span class="caps"&gt;MVC &lt;/span&gt;(model-view-controller) manner and really makes it straight forward for a simple application like this one.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://static.flickr.com/20/68898704_00167e0390_m.jpg" alt="" /&gt; &lt;a href="http://www.flickr.com/photos/wanja/68898704/"&gt;show larger image&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;Credit Card Payment&lt;/h2&gt;


	&lt;p&gt;Let&amp;#8217;s look at some code. First we need the payment gem.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;payment&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Then we just need to submit the transaction. I was really as simply as that. Of course you need a merchant account.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;process_payment&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;order&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;credit_card_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;credit_card_expiration_mmyy&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="attribute"&gt;@transaction&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Payment&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;AuthorizeNet&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;
                      &lt;span class="symbol"&gt;:prefs&lt;/span&gt;       &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="expr"&gt;#{RAILS_ROOT}&lt;/span&gt;/config/payment.yml&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:amount&lt;/span&gt;      &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@cart&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;total_price&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:expiration&lt;/span&gt;  &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;credit_card_expiration_mmyy&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:first_name&lt;/span&gt;  &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;order&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bill_to_last_name&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:last_name&lt;/span&gt;   &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;order&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bill_to_first_name&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:card_number&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;credit_card_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:invoice&lt;/span&gt;     &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;order&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;order_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                      &lt;span class="symbol"&gt;:test_transaction&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;RAILS_ENV&lt;/span&gt; &lt;span class="punct"&gt;!=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;production&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;   
                     &lt;span class="punct"&gt;)&lt;/span&gt;

    &lt;span class="attribute"&gt;@transaction&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;submit&lt;/span&gt;
    &lt;span class="attribute"&gt;@transaction&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;authorization&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;h2&gt;Migration&lt;/h2&gt;


	&lt;p&gt;We went only through the following database schema migrations:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;001_initial_schema.rb
002_add_order_ship_date_and_status.rb
003_add_order_date.rb
004_add_users.rb
005_add_product_options.rb&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;However writing migrations in Ruby is just such a simple solution and make so much sense that I am surprised that there is no standard tools like that in the Java world.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s look at migrating the schema to version 2. We need to add two columns to the orders table and default existing values to &amp;#8216;Open&amp;#8217;. No to move from version 1 to 2, simply issue the command &lt;em&gt;rake migrate&lt;/em&gt;. If for some reasons we wanted to revert to version 1, we could issue the command &lt;em&gt;rake migrate &lt;span class="caps"&gt;VERSION&lt;/span&gt;=1&lt;/em&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;AddOrderShipDateAndStatus&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Migration&lt;/span&gt;
  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.up&lt;/span&gt;
    &lt;span class="ident"&gt;add_column&lt;/span&gt; &lt;span class="symbol"&gt;:orders&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:shipped_at&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:datetime&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:null&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;
    &lt;span class="ident"&gt;add_column&lt;/span&gt; &lt;span class="symbol"&gt;:orders&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:status&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:string&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:limit&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;40&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:default&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;New&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:null&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;

    &lt;span class="ident"&gt;execute&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;UPDATE orders SET status = 'Open'&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.down&lt;/span&gt;
    &lt;span class="ident"&gt;remove_column&lt;/span&gt; &lt;span class="symbol"&gt;:orders&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:status&lt;/span&gt;
    &lt;span class="ident"&gt;remove_column&lt;/span&gt; &lt;span class="symbol"&gt;:orders&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:shipped_at&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;h2&gt;The &amp;#8220;Ajax&amp;#8221; thing&lt;/h2&gt;


	&lt;p&gt;Of course we had to play with this. We only used the no page refresh approach when updating the cart. Note when you change the quantity of a given item, the Cart and Checkout tab both get updated dynamically, as well as the total of the order. Note that I only found after the fact the &amp;#8220;right&amp;#8221; way to update multiple ids from a single server call using &lt;em&gt;evaluate_remote_response&lt;/em&gt; instead of our custom solution. In addition with the new javascript supported template (.rjs) all that will be cleaned up for our next iteration.&lt;/p&gt;


	&lt;h2&gt;Testing&lt;/h2&gt;


	&lt;p&gt;We didn&amp;#8217;t take a fully Test First Development approach, but Rails makes it so much fun to test that we quickly went back to writing tests while we where developing some of the classes like the cart model and the store controller.&lt;/p&gt;


	&lt;h2&gt;Hosting&lt;/h2&gt;


	&lt;p&gt;I believe that deploying a Rails application in a hosting environment is the weakest point of Rails today. We are using two hosts for different matters, TextDrive and Dreamhost. On other projects we are working with Tom who also happen to have helped Dreamhost setting up Rails on their server and made it pretty easy to deploy a Rails application. So Dreamhost is the route we went, however the application doesn&amp;#8217;t always respond nicely and at least not in a consistent manner. I guess that&amp;#8217;s maybe what we deserve by using a $9/month hosting plan. Let&amp;#8217;s hope that http://railsbase.com from TextDrive will provide a more compelling experience where we don&amp;#8217;t have to regularly kill ghost fastcgi processes.&lt;/p&gt;


	&lt;h2&gt;Conclusion&lt;/h2&gt;


	&lt;p&gt;It was a fun learning experience and Rails made it just enjoyable. Ruby and Ruby on Rails forces you to write clean and simple code, encourages you to write unit tests and to refactor stuff as you move along. It&amp;#8217;s impressive when comming from a java enterprise background how much more enjoyable and faster development becomes when using Rails.&lt;/p&gt;</description>
      <pubDate>Sat, 03 Dec 2005 15:04:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ac571ec7-9d94-4acb-baca-c9496c9dfeba</guid>
      <author>Daniel Wanja</author>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails</link>
      <category>Ruby On Rails</category>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by davidbennettuk@yahoo.co.uk</title>
      <description>&lt;p&gt;On October 9th 2007&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.autumnriderstees.com/"&gt;http://www.autumnriderstees.com/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;gives&lt;/p&gt;


	&lt;p&gt;Application error&lt;/p&gt;


	&lt;p&gt;Rails application failed to start properly&amp;#8221;&lt;/p&gt;</description>
      <pubDate>Wed, 10 Oct 2007 01:33:43 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2703efad-8082-48e4-9b21-c16b8f319df6</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-2665</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Raj</title>
      <description>&lt;p&gt;Hey guys great site. Any chance of publishing a step by step tutorial on this? I&amp;#8217;m new to RoR and am especially interested in the payment procedure.&lt;/p&gt;


	&lt;p&gt;Thanks&lt;/p&gt;</description>
      <pubDate>Thu, 09 Aug 2007 11:05:58 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4dd11cf4-7252-44b0-8c87-d11b770922c6</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-2497</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Raj</title>
      <description>&lt;p&gt;Hey guys great site. Any chance of publishing a step by step tutorial on this? I&amp;#8217;m new to RoR and am especially interested in the payment procedure.&lt;/p&gt;


	&lt;p&gt;Thanks&lt;/p&gt;</description>
      <pubDate>Thu, 09 Aug 2007 11:05:57 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f9bf75f5-f910-42ae-8744-c7f029f901f2</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-2496</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Sam</title>
      <description>&lt;p&gt;My advice would be to ditch shared hosting. My rails dispatchers are living on about 100 meg of virtual memory each. Add in html tidy, imagemagik, and whatever and things tend to grow. I can&amp;#8217;t assign blame to individual gems because I have not looked in to it. With Xen hosting the app is in memory 24/7 and only gets swapped to disk if I run too much on the server (which I tend to do). Shared hosting just plain sucks all around with mysql connection limits, getting hacked, cpanel, overselling, etc. . . Ditch it and go with Xen if you value your sanity. Rails runs very well when  it has room to breath. All the 500 errors and misc garbage you see on other peoples sites is due to misconfiguration or dispatchers missing in action. Dedicated memory and CPU time will solve your deployment troubles. Get Xen.&lt;/p&gt;</description>
      <pubDate>Fri, 12 Jan 2007 10:34:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c6d3685a-7a06-4d0c-905e-9c07469fdb66</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-216</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>&lt;p&gt;Hi Rashantha,&lt;/p&gt;


	&lt;p&gt;When the article was written there was not good hosting provider that support Rails without having issues with fcgi.  Now hosting providers support mongrel and the situation got easier. However, unless you have sysadmin skills it&amp;#8217;s not pretty straight forward to configure your server. Capistrano made deployment pretty easy, but there are situations where it would be nice to be able drop a packaged rails application as a single file into a server and have it deployed, without capistrano.&lt;/p&gt;</description>
      <pubDate>Fri, 12 Jan 2007 09:32:14 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e250aa29-a81d-4f55-a26b-88ad2be584ea</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-215</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by rashantha de silva</title>
      <description>&lt;p&gt;in regards to the hosting. why isn&amp;#8217;t it easy to set up a ruby hosting server? i didn&amp;#8217;t exactly understand that. where is basecamp running and what config?&lt;/p&gt;</description>
      <pubDate>Sun, 07 Jan 2007 20:52:03 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:911fbf7d-6583-4fed-8dbe-698fa6c1998c</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-211</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Charlie</title>
      <description>&lt;p&gt;Great! Thanks for the information, specially for the certificate tips. It has opened my eyes to new possibilities.&lt;/p&gt;</description>
      <pubDate>Thu, 07 Dec 2006 02:27:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:af7ee48f-e489-4be0-a1fe-ed3995262a1b</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-203</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>The url_for method takes a :protocol parameter which we set to https for the checkout link. The code looks similar to this: 
&lt;pre&gt;url_for(:action =&amp;gt; 'checkout', :only_path =&amp;gt; false, :protocol =&amp;gt; 'https://' )
&lt;/pre&gt;
We did buy a certificate at GoDaddy for $20 a year. The other cost we had was that in order to deploy the certificate on our shared host we needed a fixed ip address, so that&amp;#8217;s $50 more a year. &lt;br /&gt;</description>
      <pubDate>Wed, 06 Dec 2006 11:08:09 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a81e0329-5b05-489f-9a8e-1e41de2662ee</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-202</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Charlie</title>
      <description>&lt;p&gt;Really interesting.&lt;/p&gt;


	&lt;p&gt;How about the ssl certificate for the https protocol? Did you buy one (it is very expensive)? Or there is another cheaper solution? How did you change from a http connection to a https one from the rails code?&lt;/p&gt;</description>
      <pubDate>Wed, 06 Dec 2006 00:43:19 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d933387f-32f8-4bf9-98cc-7978adbb4e9f</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-201</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>When we create a new transaction we pass the location of the payment yml file to the :prefs parameter.
&lt;pre&gt;&lt;code&gt;   @transaction = Payment::AuthorizeNet.new(
                      :prefs       =&amp;gt; &amp;quot;#{RAILS_ROOT}/config/payment.yml&amp;quot;,
                      :amount      =&amp;gt; @cart.total_price,
                      :expiration  =&amp;gt; credit_card_expiration_mmyy,
                      :first_name  =&amp;gt; order.bill_to_last_name,
                      :last_name   =&amp;gt; order.bill_to_first_name,
                      :card_number =&amp;gt; credit_card_number,
                      :invoice     =&amp;gt; order.order_number,
                      :test_transaction =&amp;gt; RAILS_ENV != 'production'   
                     )&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The payment.yml file contains the following two lines and is in the config folder. In that case the merchant account login id is &amp;#8220;yourid&amp;#8221; and the password is &amp;#8220;secret&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;login: yourid&lt;br /&gt;
password: secret&lt;/p&gt;</description>
      <pubDate>Wed, 30 Aug 2006 11:52:32 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:42b3a026-9c90-44bf-91d0-47c445e3ea09</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-139</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by datta</title>
      <description>&lt;p&gt;hi, I am trying to connect to authorize.net through payment gem.. but getting invalid id and password error which I confirmed from authorize.net are correct id and password.. can you tell me the content of payment.yml &amp;#8230;(after spacing out your id and password)
did you use the api login id or test login id ?&lt;/p&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:52:49 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d976aca8-8669-4d36-a98a-0e7a21fbceea</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-138</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>Also check out Active Merchant - A ruby library for integrations with credit card gateways  at &lt;a&gt;http://home.leetsoft.com/am&lt;/a&gt;. This is written by the guys that work on Shopify. 
</description>
      <pubDate>Mon, 22 May 2006 07:34:24 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:75fc7038-624b-4efd-bef4-8a307db14fcf</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-107</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>I short I don't know if you can use PayPal with Authorise.Net, but I would assume not. It seems that both a different merchant accounts. But having a PaylPal merchant account would also allow you to accept credit cards.</description>
      <pubDate>Thu, 20 Apr 2006 07:43:16 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2d22abba-1379-4c53-95a3-84257d281959</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-65</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Neil Bradley</title>
      <description>Can you use PayPal with Authorise.net? I have been tasked with creating an Online Store to be able to allow people to purchase items with Credit Card and/or PayPal.</description>
      <pubDate>Wed, 19 Apr 2006 07:26:31 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8fc14ff1-e903-4c8d-9f6b-afbbe0f3f1c0</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-61</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Leslie Freeman</title>
      <description>Daniel,
Thanks for the information and the links. That was a way of approaching getting that info that I hadn't thought about. I am hopefully going to be getting to the shipping gem in the next week or so and I'll let you know what I figrue out.</description>
      <pubDate>Mon, 17 Apr 2006 22:46:40 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a027547a-e89d-40ce-be64-af3dcaccae77</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-59</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>I don't use the merchant account directly, it's Lee's dad  that runs the 'business' and it's his account. He went directly throught Authorize.Net with their online merchant interface. I believe it works well for him, althought I don't believe he has a huge volume. If he does, I may need to get back to him and ask for a couple more free t-shirts. See &lt;a&gt;http://www.authorize.net/solutions/merchantsolutions/merchantservices/merchantinterface/&lt;/a&gt; for more info on the merchant interface.</description>
      <pubDate>Mon, 17 Apr 2006 20:13:20 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:32a4592f-b4ac-4cc8-9c6b-30d9dca65e37</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-58</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Kevin</title>
      <description>What Authorize.net reseller are you using? Would you recommend them?</description>
      <pubDate>Mon, 17 Apr 2006 08:30:52 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2596f839-540e-4c66-ab4a-3ca5387afc72</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-57</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>Hi Leslie,

I have not used the shipping gem. For autumnriderstees.com the charges are based on the amount and ship_to country. So we have a ShippingCharge active record that defines the shpping charges without using an external system. For the payment gem I downloaded the api documentation from  Authorise.Net website, thats what the payment gem was coded against. I guess if you check UPS, if you didn't already, you may find more info. I saw that you can download their documentation at &lt;a&gt;http://www.ups.com/e_comm_access/gettools_index?loc=en_US&lt;/a&gt;, and they provide some more info at &lt;a&gt;http://www.ups.com/content/us/en/bussol/offering/technology/automated_shipping/online_tools.html&lt;/a&gt;. Although they mention some restrictions on the shipping calculator usage.  Let me know what you find out as I am currently working on a product for a client that may need to use this gem in the near future.</description>
      <pubDate>Sat, 15 Apr 2006 09:45:08 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f21a0b42-4724-402f-9931-7db1ca4a71fb</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-56</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Leslie Freeman</title>
      <description>Hi,
This was a great article to find! I am currently setting up my first ruby on rails ecommerce solution. I am looking at using the payment gem and I am glad to hear that it was as painless to use as it looks! I am also interested in using the shipping gem to calculate shipping costs as the business has a UPS account. Did you end up using this gem? I have had a hard time finding anything other than the API documentation for either of these gems and I was wondering if you have any good links to other info.

Thanks!
Leslie</description>
      <pubDate>Fri, 14 Apr 2006 23:48:14 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:05934907-8291-4eb6-ba0a-110324954bb9</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-55</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by Daniel Wanja</title>
      <description>The shopping cart is not available for download. We started developing a "more"  generic version where more than one type of product can be sold. I will need to see with Lee what he thinks about making the source code available. To me that  sounds as a good idea. But I don't think we will release before adding the new functionality. For setting up Rails on Dreamhost you should check Tom's blog at &lt;a href="http://convergentarts.com/"&gt;http://convergentarts.com/&lt;/a&gt; or Dreamhost's wiki at &lt;a href="http://wiki.dreamhost.com/index.php/Ruby_on_Rails"&gt;http://wiki.dreamhost.com/index.php/Ruby_on_Rails&lt;/a&gt;</description>
      <pubDate>Sun, 11 Dec 2005 12:03:18 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4aeca9cb-ad66-4a78-80be-593345460c9c</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-12</link>
    </item>
    <item>
      <title>"An on-line store build with Ruby on Rails" by todd</title>
      <description>is the shopping cart available as an install? i too am on dreamhost, and am in a way stuggling with getting rails up and running. this is an excellent resource! </description>
      <pubDate>Sat, 10 Dec 2005 19:10:10 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5588c9fc-2cea-4314-a6bc-81063baa8468</guid>
      <link>http://www.onrails.org/articles/2005/12/03/an-on-line-store-build-with-ruby-on-rails#comment-11</link>
    </item>
  </channel>
</rss>
