07-19-2011, 01:41 AM
[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']:
From: http://ellislab.com/forums/viewthread/182631/
@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/