IPN Not Sending payer_email Field For eBay Transactions

Tim76
Contributor
Contributor

As title. Stopped working today (29th March). The payer_email field is not being sent for eBay transactions, though still works for purchases made from my website (i.e. were the payment has been made on the PayPal website).

Login to Me Too
50 REPLIES 50

Tim76
Contributor
Contributor

Am I missing something, @SlickTrick? Those are both the same.

 

For the record, my own code is:

if (( $hndl = curl_init( 'https://ipnpb.paypal.com/cgi-bin/webscr' )) === false ) throw new Exception( 'Error creating cURL handle' );
Login to Me Too

SlickTrick
Contributor
Contributor

Well spotted @Tim76  I was just checking everyone reading this was awake LOL! Not! Sorry copy and paste went west!

 

Should have been:

 

$ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); or $ch = curl_init('https://ipnpb.paypal.com/cgi-bin/webscr');

 

ipnpb used instead of www or vice versa.

 

Thank you sir for pointing out my mistake.

Login to Me Too

Tim76
Contributor
Contributor

No problem. I think both URLs are valid, but I use the ipnpb one. Kinda going off topic now, so might be better to start a new thread if you need one. But if it's of any use, here's my cURL handling code. Don't know what problem you're having, but the main thing I'd say to watch out for is that you're doing type and value comparisons (===) and not just value comparisons (==, !).

 

        if (( $hndl = curl_init( 'https://ipnpb.paypal.com/cgi-bin/webscr' )) === false ) throw new Exception( 'Error creating cURL handle' );

        $send = 'cmd=_notify-validate';
        foreach ( $_POST as $k => $v ) $send .= ( "&{$k}=" . urlencode( $v ));

        if ( ! curl_setopt_array( $hndl, [CURLOPT_FAILONERROR => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $send] ))
        {
            $errno = curl_errno( $hndl );
            $errstr = curl_error( $hndl );
            curl_close( $hndl );
            throw new Exception( "Error setting cURL options: ({$errno}) '{$errstr}'" );
        }

        if (( $recv = curl_exec( $hndl )) === false )
        {
            $errno = curl_errno( $hndl );
            $errstr = curl_error( $hndl );
            $info = print_r( curl_getinfo( $hndl ), true );
            curl_close( $hndl );
            throw new Exception( "cURL response error: ({$errno}) '{$errstr}'\n{$info}\nsent: '{$send}'" );
        }

        curl_close( $hndl );
        if ( $recv != 'VERIFIED' ) throw new Exception( "PayPal payment not verified: '{$recv}'\nsent: '{$send}'" );
Login to Me Too

SlickTrick
Contributor
Contributor

I was posting these CURL's as I changed from www to ipnpb and then noticed the payer_email was not coming through so change it back to www and the next payment I got had the email int it so was just highlighting these CURL's in case the ipnpb was haivng the issue and www was working. So was just putting it out there to see who was using what and having the no email address issue. So not really going off subject but your comment is a valid one sir.

Login to Me Too

Tim76
Contributor
Contributor

Ah! Apparently I wasn't awake after all! Smiley Very Happy

Login to Me Too

LeeM53
Contributor
Contributor

Yes mine seems to be working OK now Smiley Happy

Login to Me Too

Captainmorgan1
Contributor
Contributor

Hi there

 

Started again, not working again from today showing blank email address, anyone else noted?

Login to Me Too

Swisst182
Contributor
Contributor
Yep the same is happening to me as well
Login to Me Too

Captainmorgan1
Contributor
Contributor

I think its happening again, as last time it happened in March the end for a week now happening again, can someone look into this please as not technical minded so dont know about coding but just not working.

Login to Me Too

SlickTrick
Contributor
Contributor

Yes appears yesterday IPN's all ok and today not!

I have added some code to my script to grab every post made by the IPN and normally after the verify_sign post comes the payer_email post which today was not sent it just jumps to txn_id. Fortunately, for me, I grab buyers details from eBay before they make a payment, in my case, so pretty easy for me to find it but still a pain as it means manual input to dB!

So, not sure why this is happening but guess by the time a ticket is logged and PP look into it will start working again! 

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.