PayPal APIs: Up and Running

Book description

If your web application's success depends on how quickly and easily users can make transactions, then PayPal is a solution you can't afford to overlook. This book helps you determine which PayPal option is best for your situation, and provides step-by-step instructions for implementing the payment method you choose—whether you're accepting money via the Web or mobile devices for products and services, donations, or anything else.

You'll find sample code written primarily in PHP and Objective-C, as well as use cases for executing options with PayPal's API. By the end of this book, you'll have a clear understanding of PayPal and how you can get the most out of its powerful features, no matter how much API programming experience you have.

  • Learn how to work with the PayPal API, and choose the right integration method for your project
  • Explore PayPal’s Express Checkout option, including its unique workflow and four methods of operation
  • Examine the Website Payment Pro method—with a focus on direct payments
  • Consider Adaptive Payments and learn how to set permission levels for their use
  • Use PayPal in your iOS or Android-based mobile app with the new Mobile Express Checkout method
  • Test your PayPal implementation with the sandbox

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Goals of This Book
    2. Who Should Read This Book
    3. How This Book Is Organized
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
  2. 1. The PayPal API
    1. Overview of the PayPal API
    2. Getting Started
      1. Direct Versus SDK Integration
      2. Testing Versus Live Implementation
      3. Obtaining API Credentials
      4. Creating an API Signature
      5. Creating a Name-Value Pair (NVP) Request
        1. URL encoding
        2. Request format
        3. Putting it together
      6. Parsing an NVP Response
        1. URL decoding
        2. Response format
        3. Putting it together
  3. 2. PayPal Express Checkout
    1. Checkout Process Workflows
      1. Generic Checkout Workflow
      2. Express Checkout Workflow
      3. Generic Versus Express Checkout Workflow
    2. Express Checkout Flow
    3. PayPal Express Checkout API Operations
      1. SetExpressCheckout
      2. GetExpressCheckoutDetails
      3. DoExpressCheckoutPayment
      4. Callback
    4. Simple Express Checkout Integration
      1. Setting Up the Transaction
    5. Express Checkout Integration
  4. 3. PayPal Website Payments Pro
    1. Overview of Direct Payment
    2. Direct Payment Workflow
    3. PayPal Direct Payment API Operations
    4. Simple Direct Payment Integration
    5. Direct Payment Integrations
  5. 4. PayPal Adaptive Payments
    1. Overview of Adaptive Payments
    2. PayPal Adaptive Payments API Operations Overview
    3. Adaptive Payments Permission Levels
    4. Adaptive Payments Application Workflows
    5. Payment Approval and Payment Flows
      1. Explicit Payments
      2. Preapproved Payments
      3. Implicit Payments
      4. Guest Payments
    6. Adaptive Payments API Operations in Depth
      1. Pay API Operation
      2. SetPaymentOptions API Operation
        1. displayOptions
        2. initiatingEntity
        3. requestEnvelope
        4. ResponseEnvelope
      3. ExecutePayment API Operation
    7. Adaptive Payments Integration
  6. 5. PayPal Mobile Express Checkout
    1. Mobile Express Checkout Flow
    2. Mobile Express Checkout Best Practices
    3. Mobile Express Checkout Library for iOS
      1. MEC Mobile Application Integration
      2. MEC Mobile Website Integration
      3. MEC Library Methods
        1. fetchDeviceReferenceTokenWithAppID method
        2. getPayButtonWithTarget method
        3. getInstance method
      4. MEC Localization Support
      5. Sample MEC Code
      6. Summary
  7. Index
  8. About the Author
  9. Colophon
  10. Copyright

Product information

  • Title: PayPal APIs: Up and Running
  • Author(s): Michael Balderas
  • Release date: March 2011
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449396121