Integration Guide

Table Of Contents
PayPal Payments Pro Integration Guide April 2012 51
Getting Started With Express Checkout
Testing an Express Checkout Integration
5
<form method=post action=https://api-3t.sandbox.paypal.com/nvp>
<input type=hidden name=USER value=API_username>
<input type=hidden name=PWD value=API_password>
<input type=hidden name=SIGNATURE value=API_signature>
<input type=hidden name=VERSION value=XX.0>
<input type=hidden name=PAYMENTREQUEST_0_PAYMENTACTION
value=Sale>
<input name=PAYMENTREQUEST_0_AMT value=19.95>
<input type=hidden name=RETURNURL
value=https://www.YourReturnURL.com>
<input type=hidden name=CANCELURL
value=https://www.YourCancelURL.com>
<input type=submit name=METHOD value=SetExpressCheckout>
</form>
NOTE: Use an API username from a Sandbox business test account for which a signature
exists. See the Test Certificates tab of the Sandbox to obtain a signature. If you are not
using a signature, you must use a different Sandbox server.
2. Review the response string from the SetExpressCheckout API operation.
PayPal responds with a message, such as the one shown below. Note the status, which
should include ACK set to Success, and a token that is used in subsequent steps.
TIMESTAMP=2007%2d04%2d05T23%3a23%3a07Z
&CORRELATIONID=63cdac0b67b50
&ACK=Success
&VERSION=XX%2e000000
&BUILD=1%2e0006
&TOKEN=EC%2d 1NK66318YB717835M
3. If the operation was successful, use the token and redirect your browser to the Sandbox to
log in, as follows:
https://www.sandbox.paypal.com/cgi-bin/webscr?
cmd=_express-checkout
&token=EC-1N K66318YB717835M
You may need to decode the URL, which is the opposite of URL encoding, by replacing
hexadecimal codes with ASCII codes; for example, you may need to replace %2d in the
token with a hyphen ( - ).
You must log in to https://developer.paypal.com before you log in to a Sandbox
test account. You then log in to the test account that represents the buyer, not the sellers
business test account that represents you as the merchant.
4. After logging into the buyer test account, confirm the details.
When you confirm, the Sandbox redirects your browser to the return URL you specified
when invoking the SetExpressCheckout API operation, as in the following example: