paypal IPN php script

Posted by pol on Stack Overflow See other posts from Stack Overflow or by pol
Published on 2012-09-29T08:59:49Z Indexed on 2012/09/29 9:37 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

I just realized that my paypal ipn handler in php doesn't work anymore (and I change nothing), I use the sample php script provided by paypal.

I tried to isolate the problem by making several test, and at this time I can say that the problem is not the "VERIFIED" or the "INVALID" thing but comes from these lines:

[...]

fputs ($fp, $header . $req);
    while (!feof($fp))
    {
        $res = fgets ($fp, 1024);
        if (strcmp ($res, "VERIFIED") == 0)
        {
        // check the payment_status is Completed

[...]

Anyone know if paypal change something or why it doesn't work?

thanks'

ps: if I put my code before all the paypal tests (before the line "if (!$fp)") it just works fine

© Stack Overflow or respective owner

Related posts about php

Related posts about paypal