customerEmail is the Drupal email and not the Paypal WPS customer email.

2 replies [Last post]
arcaic
Offline
Joined: 11/04/2011
Status: 
Answered

I have been setting up my thank you page and reproducing the payment information from the default thankyou page. All working fine with help of an example from the forum.

I wanted to add the Customer Email address and assumed that this would be the email address of the person paying for the membership (I use Paypal WPS so assumed it would be the paypal email). However what it seems to be is the email address of the Drupal account that has been set up.

Its quite common for an account to be created for one person but paid for using someone elses Paypal account (I always pay for my wifes Ebay stuff for instance using my ebay account) and I feel that MS really should be capturing the email address from the Paypal IPN and passing that back as the Customer Email.

Anyway thats my observation. Is it correct? If so anyway I can get the Paypal email address from the IPN (think this might need a fair few changes but not sure).

Andy

Leighton Whiting
Offline
Joined: 06/02/2009
Andy, Actually this is by

Andy,

Actually this is by design because some users don't want to have their PayPal email associated at all with their account. PayPal already emails them a receipt automatically.

You can get at the PayPal email they used in the variables on the thank-you page. It is in ther $order->payments[0]->data[] array I believe. You can try a print_r() on the $order object to see if that works. You can get at the $order variable via the $_SESSION['ms_order'] reference I believe. Of course, that would require PHP.

Hope that helps!

-Leighton

arcaic
Offline
Joined: 11/04/2011
I'm don't understand the

I'm don't understand the logic in not making it available in the 'Customer Email'. As the site owner I would like to know and have easily avaiable the 'customers' (ie the person who paid) email address.

If I use the 'Customer Name' token I get the PayPal username so I would have expected the Customer Email to give the Paypal email address. If it doesnt do this then whats the point in the token existing as you can always just use 'mail' token to get the account email.

However for my specific use case (which is just displaying it on the thankyou page) your work around is perfect.

Many thanks and thanks for the fast response.

Andy

Twitter Feed