Welcome Guest, Not a member yet? Register   Sign In
Stripe Webhook help
#1

I am trying to work with webhooks from Stripe but cannot get past the issue of it returning 302  Found as the header response.
Stripe is sending a POST with json data.

I have tried both locally and on live and it comes up with the same response.

Severity: Notice
Message: Undefined index: HTTP_REFERER
Filename: html/error_general.php
Line Number: 4


If I remove the:  require_once BASEPATH.'core/CodeIgniter.php';  
in index.php, I can get a 200 response, but it still never hits my controller.

This is my controller: (webhook_controller.php)

Code:
defined('BASEPATH') OR exit('No direct script access allowed');
class Webhook_controller extends Home_Core_Controller
{
    public function webhook()
    {
        }
}
**I also tried my webhook method in Auth_controller and Home_controller but it didn't make any difference.


This is my route:  

Code:
$route['webhook']['post'] = 'webhook_controller/webhook';

I have excluded my webhook_controller from csrf

Code:
$config['csrf_exclude_uris'] = array('ajax_admin_controller.*', 'ajax_controller.*', 'webhook_controller.*' );

I tried adding the Stripe IP in .htaccess, but it didnt change anything.

Obviously there is some security issue I am running up against, but cannot figure out how to get around.

I have been banging my head against this wall for two days, so if anyone has any suggestions, I would really appreciate it.

Thanks in advance.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB