CakePHP-Paypal-IPN-Plugin icon indicating copy to clipboard operation
CakePHP-Paypal-IPN-Plugin copied to clipboard

Need an exit() on __processTransaction() ?

Open brandonjjon opened this issue 10 years ago • 0 comments

Hi there,

I spent a ton of time on this issue. Every time a valid post would come through, my cake error.log was being spammed with hundreds (possibly thousands) of lines complaining about headers already being sent. But it wouldn't happen on an invalid post. I ended up resolved it by putting an exit(); right after $this->afterPaypalNotification($txnId); in the __processTransaction() function. I'll paste it as such:

private function __processTransaction($txnId) {
    $this->log("Processing Trasaction: {$txnId}");
    $this->afterPaypalNotification($txnId);
    exit();
}

Not sure exactly why this would happen, but glad it's fixed now. I suppose it could also be a problem with my particular project since I haven't seen any related issues.

Thanks!

brandonjjon avatar Oct 10 '14 19:10 brandonjjon