Integration Guide

Order Management Integration Guide August 2005 21
Payment Data Transfer
PDT Notification Synch
PayPal Response to POST
PayPal responds to the post with a single word on one line in the body of the response:
SUCCESS or FAIL. When you receive a SUCCESS response, the rest of the body of the
response is the transaction details, one per line, in the format
key=value where key and value are
both be URL-encoded strings. This response data needs to be parsed appropriately and then
URL-decoded.
Example successful response:
SUCCESS
first_name=Jane+Doe
last_name=Smith
payment_status=Completed
payer_email=janedoesmith%40hotmail.com
payment_gross=3.99
mc_currency=USD
custom=For+the+purchase+of+the+rare+book+Green+Eggs+%26+Ham
...
If the response is FAIL, PayPal recommends making sure that:
z The Transaction token is not bad.
z The ID token is not bad.
z The tokens have not expired.
PDT and Auto Return: Messaging to Buyer
When Auto Return, you must display a message on the page displayed by the Return URL that
helps the buyer understand that the payment has been made, that the transaction has been
completed, and that payment transaction details will be emailed to the buyer. You can display
to your customer whatever payment details you feel are appropriate; however, PayPal
recommends including the following:
z Item name
z Amount paid
z Payer email
z Shipping address
If you are using PDT to determine when to fulfill an order automatically, confirm that the
payment_status is Completed, since the buyer could use methods such as echecks that do
not immediately clear.
For a list of PDT variables, see Appendix A, “IPN and PDT Variables.”