简体   繁体   中英

paypal IPN successfully sent

I have set up a simple IPN using the code https://github.com/Quixotix/PHP-PayPal-IPN

However when I run the following

<?php
    include('ipnlistener.php');

    $listener = new IpnListener();
    $listener->use_sandbox = true;

    try {
        $verified = $listener->processIpn();
    } catch (Exception $e) {
        // fatal error trying to process IPN.
        exit(0);
    }

if ($verified) {

    if ($verified) {


     mail('myemail@gmail.com', 'Verified IPN', $listener->getTextReport()); 
    }
    else {
    /*
    An Invalid IPN *may* be caused by a fraudulent transaction attempt. It's
    a good idea to have a developer or sys admin manually investigate any 
    invalid IPN.
    */
    mail('myemail@gmail.com', 'Invalid IPN', $listener->getTextReport());
    }
}
?>

I am not getting any mail from my server saying it got the IPN from Paypal

You need to debug in detail, one way is to write the log after each line into file and then check which step is causing the problem, also you can directly browse IPN URL and check if email for invalid IPN is wokring or not. There may be an issue with mail server configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM