Developer's Guide
Table Of Contents
PayPal Express Checkout Transaction Processing
PayPal Express Checkout Sale Transaction Example
6
52 Website Payments Pro Developer’s Guide
EXAMPLE 6.3Generating a web page with a META REFRESH tag
<html>
<head>
<META HTTP-EQUIV="Refresh"CONTENT="0;URL=https://www.paypal.com/cgi-
bin/webscr?cmd=_express-checkout&token=<TOKEN>">
</head>
<body>
<!-- Most buyers will see the text below for less than a second. -->
<!-- Some browser types (example, mobile phone) do not support META refresh tags. -
->
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_express-
checkout&token=<TOKEN>"Click here if you are not redirected to PayPal within 5
seconds.</a>
</body>
</html>
Get Express Checkout Details (ACTION=G)
The Get Express Checkout Details request enables you to retrieve the customer’s billing
information, such as the postal address and email address. In addition to the parameters
required by all transaction types described in Chapter 3, “Creating a Simple Transaction
Request,” Get Express Checkout Details requires that you pass data for these parameters.
ACTION
TOKEN
EXAMPLE 6.4 Get Express Checkout Details request parameter string
"TRXTYPE=S&VENDOR=SuperMerchant&USER=SuperMerchant&PWD=SuperUserPassword&TE
NDER=P&PARTNER=PayPalUK&ACTION=G&TOKEN=EC-17C76533PL706494P"
E
XAMPLE 6.5 Get Express Checkout Details response
RESULT=0&RESPMSG=Approved&AVSADDR=Y&TOKEN=EC-
17C76533PL706494P&PAYERID=FHY4JXY7CV9PG&EMAIL=buyer_name@aol.com&PAYERSTATU
S=verified&CUSTOM=TRVV14459&FIRSTNAME=Chris&LASTNAME=Alexander&BUSINESS=Mon
roe Creek Regional Interiors&SHIPTOSTREET=5262 Green Street
#8&SHIPTOCITY=San Jose&SHIPTOSTATE=CA&SHIPTOZIP=95148&SHIPTOCOUNTRY=US
Redirecting the Customer to Your Website Example
PayPal redirects the customer back to your website at the location you specified in the
RETURNURL parameter to Get Express Checkout request. PayPal appends the PAYERID
name-value pair to the URL string, as shown below:
http://[RETURNURL]/?PayerID=<PAYERID>
You need to pass the PAYERID in the Do Express Checkout Payment request, described next.