# Building a UK based e-commerce store in rails

**URL:** <https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479>\
**Category:** Rails\
**Created:** [June 5, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479 "2006-06-05T12:37:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/1 "2006-06-05T12:37:27Z")

</div>

I have built a few sites with Rails, however I have been approached by a  
company wanting an e-commerce / online shop built. I would love to build  
one in rails with the knoweledge I now have. I have the agile book and  
the pickaxe book they are my reference guide. However there is virtually  
nothing on creating real world e-commerce sites in rails.

They will be selling to both businesses and the general public. The  
products will be mainly computer hardware but also some software  
delivery in the future

My main issues are payment and SSL and software delivery of product.  
How can I handle payments online using rails for a UK company?  
What payment processors do people use for the UK (i’m pretty new to the  
e-commerce game!) as my client does not want to use PayPal.  
SSL integegration ( I presume that this will be handled by Lighttpd in  
TextDrive).

What is the proven way of selling software products online form a store,  
specifically a rails one?

If someone could give me some proper solid advice or pointers as to  
where I can look/ask I would be most grateful.

Also are there any UK stores powered by a rails app?

I need to way up my options, I could use an open source E-commerce PHP  
engine and customise that but would really like to goe the rails way as  
we all know that is the future!

There are a lot of people mentioning [Authorize.net](http://Authorize.net). This is for the  
States only, am I wrong? What Payment Gateways are people using for a  
UK based company?

Thanks again

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 12:55pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/2 "2006-06-05T12:55:57Z")

</div>

It’s very easy to do payment integration on Rails - no different from  
other platforms really.

I’m current working on a Rails site where the client is using secpay  
([www.secpay.co.uk](http://www.secpay.co.uk)).

In the past on other (non-rails) projects i’ve used Protx  
([www.protx.co.uk](http://www.protx.co.uk)), Secure Hosting ([www.securehosting.com](http://www.securehosting.com)) and Worldpay  
([www.worldpay.com](http://www.worldpay.com)).

In my experience, it tends to come down to the client as to which is  
choosen for the project, although i’m getting more pushy since i started  
using Rails - must be a side-effect :0)

The first thing the customer will need is an internet merchant number  
from their bank. This will then be used to set up the account with the  
payment gateway. Most of the payment gateways offer advice on all of  
this.

I’ve not worked on systems that deliver products online so maybe someone  
else could advise on that - although again, i can’t imagine it being a  
big deal.

Hope that helps,

Steve

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/3 "2006-06-05T14:47:32Z")

</div>

Stephen B. wrote:

> It’s very easy to do payment integration on Rails - no different from  
> other platforms really.
> 
> I’m current working on a Rails site where the client is using secpay  
> ([www.secpay.co.uk](http://www.secpay.co.uk)).
> 
> In the past on other (non-rails) projects i’ve used Protx  
> ([www.protx.co.uk](http://www.protx.co.uk)), Secure Hosting ([www.securehosting.com](http://www.securehosting.com)) and Worldpay  
> ([www.worldpay.com](http://www.worldpay.com)).
> 
> In my experience, it tends to come down to the client as to which is  
> choosen for the project, although i’m getting more pushy since i started  
> using Rails - must be a side-effect :0)
> 
> The first thing the customer will need is an internet merchant number  
> from their bank. This will then be used to set up the account with the  
> payment gateway. Most of the payment gateways offer advice on all of  
> this.
> 
> I’ve not worked on systems that deliver products online so maybe someone  
> else could advise on that - although again, i can’t imagine it being a  
> big deal.
> 
> Hope that helps,
> 
> Steve

Steve,

Thanks for the informative reply, how difficult is it to integrate say  
secpay. It looks like they will allow connections over SSL and the use  
of XMLRPC or SOAP. In your implementation are you just directing to the  
secpay secure page for the transaction or are you using XML or SOAP to  
connect?

What is the best way (or gem) to work with XML in rails?

The pricing on Secpay looks to be pretty good too.

Many thanks again steve

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/4 "2006-06-05T15:34:39Z")

</div>

Stephen B. wrote:

> > In your implementation are you just directing to the  
> > secpay secure page for the transaction  
> > I’ve just gone with the simplest way yeah :0) I’ve used SSL/Remote Calls  
> > with PHP on a Protx integration but to be honest, i’ve found a bit over  
> > the top in most cases. This site just sends the user to secpay and  
> > recieves a postback notification with the result of the card  
> > transaction.
> 
> As such i’ve not really XMLRPC or SOAP in a Rails app, although i know  
> they’re both spikey subjects in the Rails community :0)
> 
> Steve

It looks like integrating an XMLRPC solution should be fairly simple, at  
least on paper anyway. The XMLRPC looks quite integrated in Rails have  
not used it myself so I will look into it are there any pitfalls I need  
to know about before hand?

Also is there an issue with switching between normal site & SSL site?

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 3:23pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/5 "2006-06-05T15:23:52Z")

</div>

> In your implementation are you just directing to the  
> secpay secure page for the transaction  
> I’ve just gone with the simplest way yeah :0) I’ve used SSL/Remote Calls  
> with PHP on a Protx integration but to be honest, i’ve found a bit over  
> the top in most cases. This site just sends the user to secpay and  
> recieves a postback notification with the result of the card  
> transaction.

As such i’ve not really XMLRPC or SOAP in a Rails app, although i know  
they’re both spikey subjects in the Rails community :0)

Steve

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 4:01pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/6 "2006-06-05T16:01:28Z")

</div>

James W. wrote:

> There are a lot of people mentioning [Authorize.net](http://Authorize.net). This is for the  
> States only, am I wrong? What Payment Gateways are people using for a  
> UK based company?

I’ve got a working Ruby library for Protx if you want - it’s a bit  
rough and could probably do with being rolled into one of the other  
payment frameworks (Active Merchant) but has been in use with us for  
a few months without fault.

It’s for their VSP Direct protocol ([http://www.protx.com/support/](http://www.protx.com/support/)  
04\_downloads.asp)

J

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 5, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/7 "2006-06-05T16:29:33Z")

</div>

I’ve used SecPay in the past and now use Protx for my clients, Secpay  
were pretty good but all my clients prefer Protx now, but it’s all a  
matter of personal taste really, they’re both very good at what they do.

James Burns-Howell wrote:

> I’ve got a working Ruby library for Protx if you want - it’s a bit  
> rough and could probably do with being rolled into one of the other  
> payment frameworks (Active Merchant) but has been in use with us for  
> a few months without fault.
> 
> It’s for their VSP Direct protocol ([http://www.protx.com/support/](http://www.protx.com/support/)  
> 04\_downloads.asp)
> 
> J

I would love a copy of that library if you don’t mind, would be very  
useful, any chance of posting it? many thanks, Chris

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [June 6, 2006, 12:34pm UTC](https://www.ruby-forum.com/t/building-a-uk-based-e-commerce-store-in-rails/62479/8 "2006-06-06T12:34:44Z")

</div>

James Burns-Howell wrote:

> James W. wrote:
> 
> > There are a lot of people mentioning [Authorize.net](http://Authorize.net). This is for the  
> > States only, am I wrong? What Payment Gateways are people using for a  
> > UK based company?
> 
> I’ve got a working Ruby library for Protx if you want - it’s a bit  
> rough and could probably do with being rolled into one of the other  
> payment frameworks (Active Merchant) but has been in use with us for  
> a few months without fault.
> 
> It’s for their VSP Direct protocol ([http://www.protx.com/support/](http://www.protx.com/support/)  
> 04\_downloads.asp)
> 
> J

James, have been looking at Protx and my client is leaning towards them  
now. If you have a rough cut of the code for the Protx Direct protocol  
that would be great ti use as a basis. I have looked at ActiveMerchant  
and would be looking to integrate a Protx solution in with in. You can  
get my email address from my name on the top of the post.

Do you find that working with the Protx protocol to be fairly intuitive?  
As they don’t use XML RPC or SOAP it seems a little more fiddly to me.  
You have to deal with HTTPS POSTS and Requests.

I take it that the code you built was based around the PHP example they  
supply?

Many thanks again.
