Integration Guide
Table Of Contents
- Express Checkout Integration Guide
- Contents
- Preface
- Introducing Express Checkout
- Express Checkout Button and Logo Image Integration
- PayPal Name-Value Pair API Basics
- Implementing the Simplest Express Checkout Integration
- Testing an Express Checkout Integration
- Customizing Express Checkout
- Implementing the Instant Update API
- Immediate Payment
- Handling Payment Settlements
- Handling Recurring Payments
- How Recurring Payments Work
- Recurring Payments Terms
- Recurring Payments With Express Checkout
- Options for Creating a Recurring Payments Profile
- Recurring Payments Profile Status
- Getting Recurring Payments Profile Information
- Modifying a Recurring Payments Profile
- Billing the Outstanding Amount of a Profile
- Recurring Payments Notifications
- Using Other PayPal API Operations
- Integrating giropay with Express Checkout
PayPal Name-Value Pair API Basics
Creating an NVP Request
3
32 October 2009 Express Checkout Integration Guide
To enable PayPal to authenticate your request
1. Specify the API user name associated with your account.
USER=
API_username
2. Specify the password associated with the API user name.
PWD=
API_password
3. If you are using an API signature and not an API certificate, specify the API signature
associated with the API username.
SIGNATURE=
API_signature
Specifying Credentials in PHP
$API_UserName = urlencode('my_api_username'); // replace with API username
$API_Password = urlencode('my_api_password'); // replace with password
$API_Signature = urlencode('my_api_signature'); // replace with actual sig
// NVPRequest for submitting to server$nvpreq
= "...&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature...";
URL Encoding
All requests to execute PayPal API operations sent via HTTP must be URL encoded.
The PayPal NVP API uses the HTTP protocol to send requests and receive responses from a
PayPal API server. You must encode all data sent using the HTTP protocol because data that is
not encoded could be misinterpreted as part of the HTTP protocol instead of part of the
request. Most programming languages provide a way to encode strings in this way. You
should consistently URL encode the complete API request; otherwise, you may find that
unanticipated data causes an error.
NOTE: An HTTP form is automatically URL encoded by most browsers.
List Syntax for Name-Value Pairs
The PayPal API uses a special syntax for NVP fields defined as lists.
The NVP interface to the PayPal API requires a unique name for each field. In the API, lists
are prefixed by L_. To identify an element within the list, use the offset from the beginning of
the list, starting with 0 as the first element. For example, L_DESC0 is the first line of a
description, L_DESC1, is the second line, and so on.