Home arrow Ruby-on-Rails arrow Checkout and Order Processing for an Ecommerce Website
RUBY-ON-RAILS

Checkout and Order Processing for an Ecommerce Website


It's vital for an ecommerce website to get the checkout and ordering process correct. This five-part article series shows you how to use Ruby-on-Rails to manage it with very little difficulty. It's excerpted from chapter nine of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
July 08, 2010
TABLE OF CONTENTS:
  1. · Checkout and Order Processing for an Ecommerce Website
  2. · Implementing the Check Out User Story
  3. · Specifying the Associations
  4. · Adding Validations to the Model

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Checkout and Order Processing for an Ecommerce Website
(Page 1 of 4 )

In this chapter, we’ll implement a checkout page and an order-processing system for the Emporium site. This involves integrating with payment gateways, which George uses for handling the transactions.

We’ll show you how to integrate with two popular payment gateways: PayPal and Authorize.Net using two separate frameworks: the Active Merchant plugin and the Payment gem. These two libraries have already implemented the toughest part of the integration with the payment gateway. All we need to do is implement the front-end for the user stories and use the libraries to communicate with the payment gateways.

Towards the end of the chapter, we’ll explain how to use the Shipping gem to calculate shipping costs. Lastly, we’ll briefly discuss how taxes are calculated.

Getting the Checkout and Order-Processing Requirements

For this sprint, we have four user stories to implement:

  1. Check out: Jill, Emporium’s beloved customer, has found two new books that she wants to buy, and has placed them in the shopping cart. The next step for her to continue with the order is to go to the checkout page. Here, she can type in her contact information, the shipping address, and credit card information, and then place the order by submitting the information. This initiates the order-processing workflow that involves billing the customer and shipping the books.
  2. View orders: George needs to be able to view the status of all orders, such as processed orders and closed ones. Processed orders are the ones that have been billed to the customer but have not been shipped yet. Closed orders are the ones that George has sent to the customer. 
     
  3. View order: Before George can ship anything anywhere, he must be able to view the details of the order. We will add a page that shows the shipping address and billing information, along with the contact information for the customer. 
     
  4. Close order: After George has shipped the books, he should close the order. We will set this up on the order details page, so George can simply click a button that sets the order status to closed.

Let’s start by implementing the Check Out user story.


blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form
- Ruby on Rails Templates and Layouts
- Action Pack Controller Creation
- Writing an Action Pack Controller

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials