Preface

Virtually every application delivery model is experiencing a surging demand for transaction convenience. In this book, I introduce PayPal APIs, along with instructions and resources for their integration in different environments, including websites and mobile applications.

Goals of This Book

The goal of this book is to help you understand what PayPal has to offer. Let’s face it, you want to get money from your customers into your bank account as quickly as possible, and I want to help you accomplish this. By the end of this book, you will have a better understanding of what PayPal is, how PayPal can streamline your payments, and how to get the most out of PayPal for your particular payment situation.

Who Should Read This Book

This book is for anyone who wants to accept payments for their goods or services through PayPal. You might be an individual with an open source project looking to accept donations, a multimillion-dollar corporation, a nonprofit requesting donations to help a cause, or a software developer writing mobile apps for cell phones. PayPal can provide you with solutions, no matter who you are. The code samples in this book are provided in PHP and Objective-C, and limited code coverage of Droid is included in Chapter 5. An understanding of using APIs is recommended, but not required.

How This Book Is Organized

Here is a brief summary of the chapters in the book and what you can expect from each:

Chapter 1, The PayPal API

Covers the PayPal API and how to start using it to accept payments, with an emphasis on choosing an integration method for your project as well as obtaining the necessary credentials to get started. I also cover how to use the sandbox to test your application.

Chapter 2, PayPal Express Checkout

Covers Express Checkout and how to use the API to execute Express Checkout Payments. This chapter contrasts the Generic (or Traditional) checkout workflow with the Express Checkout workflow. All four of the Express Checkout operations (SetExpressCheckout, GetExpressCheckoutDetails, DoExpressCheckoutPayment, and Callback) are covered.

Chapter 3, PayPal Website Payments Pro

Covers Website Payments Pro, with an emphasis on Direct Payments. I demonstrate the Direct Payment workflow in a sample transaction. A simple Direct Payment Integration sample is also included.

Chapter 4, PayPal Adaptive Payments

Covers Adaptive Payments, including an overview of Adaptive Payments as well as a breakdown of the Permission Levels provided via Adaptive Payments. Application workflows, Payment Approval, and Payment flows are also included.

Chapter 5, PayPal Mobile Express Checkout

Covers Mobile Checkout, with an emphasis on the newly released Mobile Express Checkout and the Mobile Payment Libraries for iOS- and Droid-based smartphones.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip, suggestion, or general note.

Caution

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “PayPal APIs: Up and Running by Michael Balderas. Copyright 2011 O’Reilly Media, Inc., 978-1-449-39612-1.”

If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707 829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://oreilly.com/catalog/0636920014386

To comment or ask technical questions about this book, send email to:

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Get PayPal APIs: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.