My client at Battery Opera wanted to sell his book online. I thought this would be a good time to finally break free from PayPal and accept credit card payments directly. You can see the result here: M/Hotel.

The main problem was that the store page needed to be served from a secure server. I had previously set up a SSL account for https://secure.adam8.com, but I wanted Battery Opera's store to be independent of me. I used the free SSL service using Google Cloud Storage, serving the store as a static page. All the files linked from within the page had to also be on SSL, so luckily they were mostly already using Cloud Storage, or were publicly available on SSL. Unfortunately I had to use a convoluted domain name (https://commondatastorage.googleapis.com/static.batteryopera.com/index.html), but heck, it's free. To the viewer, when they click the "Store" button in the website's nav, they won't know or care that it's on a different domain. The Green SSL lock is there, so it's secure for them to enter their credit card details.

Stripe is a joy to set up using their Python library in the backend. All I have to do is collect the Stripe token and the buyer's name and address. App Engine sends the notification emails (from @batteryopera.com, since it's a Google App email.)

Validation is with jQuery on the front end, and Stripe and Python in the back end. I added a tad of javascript to adjust the price on the BUY button according to what country the book is being shipped to.

I couldn't be happier. My clients would always complain about the sluggish and obtrusive PayPal signup screen... how their customers didn't want to join. I would explain that customers didn't have to signup, that they could just pay with credit card, but at this point every extra decision and step in the way of making their purchase was a chore. No fun.

Now go buy your copy of M/Hotel by David McIntosh! It's only $15... it should be a pleasure to buy!