/** * Process IPN request from ClickBank. Only process POST request * * @param object $_POST * @return int HTTP code */ public function ipn(SS_HTTPRequest $request) { if ($request->isPost()) { if (ClickBankManager::validate_ipn_request($request->postVars())) { ClickBankManager::process_ipn_request($request->postVars()); return Director::get_status_code(); } } return ErrorPage::response_for(404); }