Hey everyone. Here is my issue: I've set up the cron job correctly, and every possible alternative way that I could. /usr/bin/curl http://*MY_DOMAIN*/amember/webhooks/cron /usr/bin/curl http://*MY_DOMAIN*/amember/webhooks/cron.php /usr/bin/curl http://*MY_DOMAIN*/amember/cron /usr/bin/curl http://*MY_DOMAIN*/amember/cron.php Also all these with https instead. If I visit cron.php myself and manually trigger it, it gives another 400 error as well.
Hello, Are you sure your script that should handle Webhook works correctly? Did you try to open this webhook url in browser? Can you contact us in helpdesk? https://www.amember.com/support We will check what can be wrong. Best Regards.
Yeah I did. The webhook URL works, it is just a slack one actually...I just was blurring out my team for no real reason. The script for the webhooks is just the plugin that is with aMember. Not sure what else I can do...?
Slack expect specific data on this url and Webhooks can not be used in this case (it have its own format of data). Here us example of code that can be used in site.php to pass some events to Slack: http://www.amember.com/docs/Site.php_file PHP: Am_Di::getInstance()->hook->add(Am_Event::INVOICE_STARTED, function(Am_Event $e) { $u = $e->getUser(); $item = $e->getInvoice()->getItem(0); $r = new Am_HttpRequest('https://hooks.slack.com/services/XXXX/XXXXX/XXXX', Am_HttpRequest::METHOD_POST); $r->setBody(json_encode(['text' => sprintf('%s sign up for %s', $u->login, $item->item_title)])); $r->setHeader('Content-type', 'application/json'); $r->send();});