Archives For ecom

Choosing a Payment Gateway

September 16, 2010

In my forthcoming “Effortless E-Commerce with PHP and MySQL” book (which is pretty much my only focus these days), I wanted to use two different payment systems. This was part of my overall approach of trying to present as big of a picture as possible as to what “e-commerce” is. For the book’s first example, I wanted to use PayPal. Many developers don’t like PayPal, but for customers, it’s the most recognizable name, and that’s critical when it comes to customers being comfortable spending money at a site. People traditionally think of PayPal’s as a system where the customer leaves the e-commerce site, goes to PayPal’s site, and hopefully returns to the original e-commerce site after making the purchase. This is formally called PayPal’s Website Payments Standard, and is demonstrated in my book. In that example, I make use of PayPal’s IPN (Instant Payment Notification) system, so that the site is notified as soon as the payment is made, whether or not the customer actually returns to the e-commerce site immediately thereafter. Tapping into IPN makes the use of PayPal more professional and reliable for the site itself.

For the second example in the site, I wanted to use a true payment gateway: a system that can be integrated into a site so that the customer never leaves. A secondary, but big, benefit of a payment gateway is that the funds get transferred to the site’s merchant bank account, instead of to a PayPal account. (To be clear, PayPal’s Website Payments Pro works as a payment gateway that can be integrated into a site, but I believe the funds still go into one’s PayPal account.) I’ve used several different gateways over the years, but rarely made the selection myself (normally it’s the client making the choice, based upon their merchant bank account). So I spent some time researching payment gateways to find the one that would be best for the book. Many readers also provided their recommendations (thanks!). Here’s how that search went for me… Continue Reading…

I haven’t been posting much the past couple of weeks because I’ve been working night and day on my “Effortless E-Commerce with PHP and MySQL” book. The deadline for me to turn it all in was August 31st, but I’ve got just a little bit of leeway. I should be wrapping the first draft within the next few days and I’m about halfway through the second draft. To explain…

Basically I write a chapter at a time in Word, passing each along to the editor. The chapters go through a line editor (who looks at word choice, clarity, and style) and a tech editor (who looks at the code and such), then come back to me. At that point I do what’s called an author rewrite (AR), addressing the issues raised by the editors and correcting any thing that I later realized would be a problem (especially on a book like this, where chapters build on each other, it’s common to find when writing Ch 7 that something needs to be said or done in Ch 6). After the AR, the chapter gets turned into a PDF, laid out as it will be in the printed book.

So right now, I’m just about to complete Ch 10 (first draft) and do the AR of Ch 6. The plan is for the book to go to the printer on Sept. 23rd, making it available in stores in October.

In my next couple of posts (soon!), I’ll talk about my selection of Authorize.net as the second payment processor and provide the final table of contents. Thanks to everyone for their interest in the book!

For the past couple of weeks I’ve been working full-bore on my next book, titled “Effortless E-commerce with PHP and MySQL” (the name has changed slightly since its original), which is why I haven’t been able to post much on the blog. I’m currently working on Chapter 5 , which is the penultimate chapter for the first of the two e-commerce examples being developed. Here’s how the first six chapters are shaping up:

Part 1: Fundamentals

Chapter 1: Getting Started

  • Identifying Your Business Goals
  • Researching Legal Issues
  • Choosing Web Technologies
  • Selecting a Web Host
  • Using a Payment System
  • The Development Process

Chapter 2: Security Fundamentals

  • Security Theory
  • PCI Requirements
  • Server Security
  • Using Secure Transactions
  • Common Vulnerabilities

———————

Part 2: Selling Virtual Products

Chapter 3: First Site: Structure and Design

  • Database Design
  • Server Organization
  • Connecting to the Database
  • The Config File
  • The HTML Template

Chapter 4: User Accounts

  • Defining Helper Functions
  • Registration
  • Logging In
  • Logging Out
  • Managing Passwords
  • Improving the Security

Chapter 5: Managing Site Content

  • Creating an Administrator
  • Adding Pages
  • Displaying Page Content
  • Adding PDFs
  • Displaying PDF Content
  • Recommended Alterations

Chapter 6: Using PayPal

———————

Chapter 1 is an overview of the process along with tips for making certain decisions, such as hosting. Chapter 2 is generally a big-picture look at security, along with what primary decisions (e.g., hosting, certificate types) you’ll need to make. At the end of the chapter, I discuss the most common server vulnerabilities and attacks and how you go about preventing those. Although the chapter is really about an approach to security, it has some exact recommendations as well. More specific security techniques are demonstrated throughout the rest of the book.

In Chapters 3-6, you’re creating a entire site for selling access to online content, in both HTML and PDF formats. You’ll learn some ways to automate processes and effectively separate out bits of code to make the site easy to maintain. I don’t do anything fancy with the HTML templates, the PHP, or the MySQL, but there’s some great application of those technologies (in other words, you’ll learn a lot but won’t be overwhelmed with stuff like Smarty, OOP, etc.).

In Chapter 4 I created some really great helper functions. I even impressed myself with their usefulness and simplicity. The chapter also handles passwords and form validation in very secure ways. Chapter 4 concludes with some other ways you can heighten the security of the system, when you deem that appropriate. Chapter 4, User Accounts, may be something you’re familiar with overall (perhaps from another book of mine), but I think I’ve added enough new ideas here to still give you some value for reading it.

In Chapter 5 you learn how to add content to the site. There are two types. For the first, you can add HTML content using a WYSIWYG editor, that I show you how to integrate. For the second, you can upload PDFs. The PDFs will only be served through a proxy script so that a user must be logged in (with an account that hasn’t expired) to access them. The chapter wraps with discussions of about six different features you could add to the site, almost all intended to make it a better site for the potential customers. Although I don’t walk through the every add-on in complete detail, you’ll see what other tables you’d need to create, what SQL commands might be involved, and how the PHP code would work. I like this addition to the chapter and hope you will, too.

Chapter 6 integrates PayPal. You’ll learn a bit about how PayPal works and what its strengths and weaknesses are. Then you’ll use PayPal’s sandbox to test your site and see what you need to do to take the site live.

Next week I’ll be starting on Part 3 of the book, in which you’ll create an online site that sells coffee (beans, not brewed). I choose coffee as a product for a couple of reasons. First, I love coffee. Second, it’s an example of a physical product that must be shipped, that has inventory, and that also has permutations–size, roast, whole beans/ground–without being too, too complicated.

So that’s where things stand. Thanks for your interest in the book and please share any questions and comments you may have!