1

I integrated the Omnipay PayPal express.

After the completePurchase() I need the PayPal buyer email adress.

I can access the Transaction ID with $data['PAYMENTINFO_0_TRANSACTIONID'] and also the Payer ID through $_GET['PayerID'].

Any ideas how to get the buyers email?

Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
Prof
  • 11
  • 2

1 Answers1

1

After completePurchase(), you need to fetch the checkout datas:

$response = $gateway->fetchCheckout($parameters)->send();
$data = $response->getData();

// you can check the full received data
print "<pre>";
var_dump($data);

And in this array, you've got a $data["EMAIL"] variable, wich stores the payer's e-mail address.

Regards!

P.s.: For more information and a TL;DR disquisition, check this.

Sentence
  • 192
  • 4
  • 10