Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter vs IPN
#5

[eluser]benjamin[/eluser]
@acreative: Thanks for your time. Yes, you are right in saying that PayPal requires an exact copy of the original IPN message to be sent back. However this wasn't the problem. Figured it out at long last:

The problem was that I had CSRF enabled - so, PayPal couldn't post to my controller. The solution is to paste the following code snippet into your config file where
you would usually set $config['csrf_protection']:

Code:
if (isset($_SERVER["REQUEST_URI"])) {
    if (stripos($_SERVER["REQUEST_URI"], '/paypal_ipn') === FALSE) {
        $config['csrf_protection'] = TRUE;
    } else {
        $config['csrf_protection'] = FALSE;
    }
} else {
    $config['csrf_protection'] = TRUE;
}

From: http://ellislab.com/forums/viewthread/182631/


Messages In This Thread
CodeIgniter vs IPN - by El Forum - 07-18-2011, 09:47 AM
CodeIgniter vs IPN - by El Forum - 07-18-2011, 09:59 AM
CodeIgniter vs IPN - by El Forum - 07-18-2011, 11:01 AM
CodeIgniter vs IPN - by El Forum - 07-18-2011, 12:05 PM
CodeIgniter vs IPN - by El Forum - 07-19-2011, 01:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB