Download PayPal Name-Value Pair API - 2007 Reference Manual
Transcript
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Documentation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Chapter 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Introducing the PayPal NVP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Integrating with the PayPal API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Basic Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Create a Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Get API Credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Create and Post the Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Interpret the Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Taking Your Application Live . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Set Up a PayPal Business Account . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Set Up API Credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Modify Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Technical Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Request-Response Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Request Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Response Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Posting Using HTTPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chapter 2 Accepting PayPal in Express Checkout . . . . . . . . . . . 17 Basic Checkout with PayPal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1. Starting the Checkout Using SetExpressCheckout . . . . . . . . . . . . . . . . . . 18 2. Redirecting the Customer’s Browser to PayPal Login Page . . . . . . . . . . . . . 18 3. Getting Payer Details Using GetExpressCheckoutDetails . . . . . . . . . . . . . . 19 4. Making a Sale Using DoExpressCheckoutPayment . . . . . . . . . . . . . . . . . 19 Support giropay and electronic funds transfer . . . . . . . . . . . . . . . . . . . . . . . . 20 Initiate the Flow with SetExpressCheckout . . . . . . . . . . . . . . . . . . . . . . . 20 Redirecting the Customer to PayPal. . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Name-Value Pair API Developer Guide and Reference April 2007 3