Take My Money
Accepting Payments on the Web
by Noel Rappin
Version: P1.0 (January 2017)
Copyright 2017 The Pragmatic Programmers, LLC. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trustyou can use this across all of your devices but please do not share this copy with other members of your team, with friends, or via file sharing services. Thanks.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein.
About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. Were here because we want to improve the lives of developers. We do this by creating timely, practical titles, written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. We pioneered the beta book concept, where you can purchase and read a book while its still being written, and provide feedback to the author to help make a better book for everyone. Free resources for all purchasers include source code downloads (if applicable), errata and discussion forums, all available on the book's home page at pragprog.com. Were here to make your life easier.
New Book Announcements
Want to keep up on our latest titles and announcements, and occasional special offers? Just create an account on pragprog.com (an email address and a password is all it takes) and select the checkbox to receive newsletters. You can also follow us on twitter as @pragprog.
About Ebook Formats
If you buy directly from pragprog.com, you get ebooks in all available formats for one price. You can synch your ebooks amongst all your devices (including iPhone/iPad, Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition. And, of course, you can always come back and re-download your books when needed. Ebooks bought from the Amazon Kindle store are subject to Amazon's polices. Limitations in Amazon's file format may cause ebooks to display differently on different devices. For more information, please see our FAQ at pragprog.com/frequently-asked-questions/ebooks. To learn more about this book and access the free resources, go to https://pragprog.com/book/nrwebpay, the book's homepage.
Thanks for your continued support,
Dave Thomas and Andy Hunt
The Pragmatic Programmers
The team that produced this book includes: Katharine Dvorak (editor) Potomac Indexing, LLC (indexer) Liz Welch (copyeditor) Gilson Graphics (layout) Janet Furlow (producer)
For customer support, please contact .
For international rights, please contact .
Disclaimer: This book is intended only as an informative guide on setting up a financial transaction website. Information in this book is general, and the author, editors, and The Pragmatic Programmers, LLC disclaim all liability for compliance to federal, state, and local laws in connection with the use of this book. This work is sold with the understanding that the author, editors, and The Pragmatic Programmers, LLC do not offer legal, financial, or other professional services. If professional assistance is required, the services of a competent professional person should be sought.
Table of Contents
Copyright 2017, The Pragmatic Bookshelf.
Early praise for Take My Money: Accepting Payments on the Web
The ability to easily and securely accept payments on the web is critical to any business. Accepting Payments on the Web acts as a shining beacon, guiding intermediate and advanced developers through the complexities of setting up a payment system, interacting with third-party processors, and staying within compliance regulations. This book is a must-have for any application developer.
Nell Shamrell |
Software development engineer, Chef |
Do you need to accept money on the web? No problem! Just follow the steps in Noel Rappins book and you will be taking money in a blink of an eye.
Brian Schau |
Lead developer, Rosving Applications |
Ive maintained two large payment systems at two different e-commerce companies, and the hard lessons I learned are all captured succinctly in this book. I wish Id had it years ago.
David Copeland |
Author of Rails, Angular, Postgres, and Bootstrap, Second Edition |
Reading this book has increased my confidence in the daunting task of handling electronic payments. All the topics Id hoped would be covered are here, along with useful introductions to handy gems and third-party tools.
Nigel Lowry |
Company director and principal consultant, Lemmata Ltd. |
I would not hesitate to recommend this book to anyone looking to accept payments online. I only wish Id had this detailed a guide when building some of the systems Ive written in the past; it would have saved me a great deal of stress and pain.
Stephen Orr |
Senior developer, Siftware |
Acknowledgments
Many people helped me take this book from an idea to a finished project. Among the many who helped are the following:
Katharine Dvorak edited this book and has helped shape the material, make it more consistent, and point out where it needed to be clearer. Susannah Davidson Pfalzer helped get this project started and remains a pleasure to work with.
Several people provided technical reviews and made this a better book with their comments: Zach Briggs, David Copeland, Robin Dunlop, Kenneth Geisshirt, Jeff Holland, Aaron Kalair, Kaan Karaca, Irakli Nadareishvili, Nigel Lowry, Stephen Orr, Martijn Reuvers, Brian Schau, Nell Shamrell, Tibor Simic, Stefan Turalski, and Brian VanLoo.
Ive been fortunate to work at Table XI while writing this book, and I thank them for their support. The project that inspired this book was a Table XI client project, and I benefited from the skill and insight of many of my coworkers as we built it.
This book, and most of my career, would not exist without the generosity of the community of developers who write and maintain the open source tools that I use. Thanks to all of you.
Thanks also to my children, Emma and Elliot. You are amazing and wonderful. My wife Erin is my favorite person. I love you.
Copyright 2017, The Pragmatic Bookshelf.
Preface
A few years ago, I started working on my first web application that required serious payment business logic. The application was a legacy rescue, meaning that the actual core of the payment section already existedthe application already had a payment gateway, which is the third-party service that handles the credit card transaction, and knew how to communicate credit card information.