2

I am new to PHP scripting, as well as to PayPal's Digital Goods Express Checkout. I integrated into the orderconfirm.php file code that would automatically generate an email with additional information for the buyer. The one problem I seem to be having, and I've searched all over trying to find a solution, is that I can't seem to figure out the proper syntax and coding for retrieving the buyer/payer's email address to include in that portion of the script. I notice that depending on where you look PayPal has a different name for the buyer's email address, (ie, payer, email, payeremail, etc.). Can anyone tell me, and give me an example I can work with, the proper coding and syntax for accomplishing this? I would greatly appreciate it!

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

3

You can do a GetExpressCheckoutDetails API call or use Instant Payment Notification (IPN).

With GetExpressCheckoutDetails you'll look up the Express Checkout token and receive a bunch of information on the buyer including their e-mail address. The token does expire after 3 hours so if you're after the information later that may not work for you.

IPN sends out a post to a notification URL you set including information on the payment and buyer (with their e-mail address).

Gerzie
  • 2,330
  • 1
  • 12
  • 12