IPN - payer email is no longer supplied in 95% of transactions

bnctech
Contributor
Contributor

Hi,

 

After few years of normal working of our script, from 29.03.2019 we stopped receiving payer_email address. That's very important for us to get the buyer email address after ebay transaction.

 

I noticed that there are few type of confirmation emails from Paypal about instant payment. Only for the type where the buyer email is in the line like:  You received a payment of £XX.XX GBP from ABCD (dsada %at% sdh.co.uk) we are receing the payer email from the IPN as normal. For all other types we are not receiving this. We checked that raw data no longer contains this. The thing is that previously the Confirmation emails looked exactly the same, so it seems that Paypal has changed something in the IPN method since 29.03.2019.

 

Are there any other way to get the payer email address after we receive payment for ebay transaction?

 

Our part of code:

 

<?php
define("USE_SANDBOX", 0);
$file = 'logs.txt'; 
$raw_post_data = file_get_contents('php://input');
 
$raw_post_array = explode('&', $raw_post_data);
$myPost = array();
foreach ($raw_post_array as $keyval) {
  $keyval = explode ('=', $keyval);
  if (count($keyval) == 2)
     $myPost[$keyval[0]] = urldecode($keyval[1]);
}
 
$req = 'cmd=_notify-validate';
if(function_exists('get_magic_quotes_gpc')) {
   $get_magic_quotes_exists = true;
foreach ($myPost as $key => $value) {        
   if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { 
        $value = urlencode(stripslashes($value)); 
   } else {
        $value = urlencode($value);
   }
   $req .= "&$key=$value";
}
 
if(USE_SANDBOX == true) {
} else {
 
// Step 2: POST IPN data back to PayPal to validate
 
$ch = curl_init($paypal_url);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
 
if( !($res = curl_exec($ch)) ) {
    curl_close($ch);
    exit;
}
curl_close($ch);
 
$found = false;
$transaction_id = $_POST['txn_id'];
$item_number = $_POST['item_number'];
$payer_email = $_POST['payer_email'];
$now = date("Y-m-d H:i:s");
...............
 

Thank you

 

Login to Me Too
3 REPLIES 3

stecotec
New Community Member

Same problem here. You can't just remove such an important parameter from the IPN data and don't notify your customers. How could someone even think that this is a good idea? Are you serious? Please fix this issue as soon as possible. 

Login to Me Too

arganoildirect
Contributor
Contributor

Same problem..
Payer_email not longer included in IPN data which has messed up a whole lot of back end processing!

Any solutions or answers from Pay Pal or Ebay?

Login to Me Too

arganoildirect
Contributor
Contributor

In case anyone has missed this "solution".

The direct payment confirmation email from Pay Pal contains the buyers email address.
You can get it either manually or by some sort of PHP script to check the emails.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.