Skip to content

Commit

Permalink
Upgrade to Zikula 3.1
Browse files Browse the repository at this point in the history
Updated for Zikula 3.1 and Fixed a small bug in IPNListener when debugging.
  • Loading branch information
paustian committed Jan 23, 2022
1 parent d1d32a3 commit 07c0a63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Api/IpnListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function processIpn($post_data = null) : bool {
}
if ($this->debug) {
$this->response = "VERIFIED";
$this->response_status = '200 OK';
$this->response_status = '200';
} else {
$this->curlPost($encoded_data);
}
Expand Down
16 changes: 8 additions & 8 deletions Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AdminController extends AbstractController {
* @author Timothy Paustian
* @return Response The main module admin page.
*/
public function indexAction() : Response {
public function index() : Response {
// Security check
if (!$this->hasPermission('WebsiteFeeModule::', '::', ACCESS_ADMIN)) {
throw new AccessDeniedException();
Expand All @@ -67,7 +67,7 @@ public function indexAction() : Response {
* @author Timothy Paustian
* @return response The main module admin page.
*/
public function editAction(Request $request, WebsiteFeeSubsEntity $subscriber = null) {
public function edit(Request $request, WebsiteFeeSubsEntity $subscriber = null) {
// Security check - important to do this as early as possible to avoid
// potential security holes or just too much wasted processing
if (!$this->hasPermission('WebsiteFeeModule::', '::', ACCESS_ADD)) {
Expand Down Expand Up @@ -111,7 +111,7 @@ public function editAction(Request $request, WebsiteFeeSubsEntity $subscriber =
* Set up a form to present all the exams and let the user choose
* The one to modify
*/
public function modifyAction(Request $request) {
public function modify(Request $request) {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_EDIT)) {
throw new AccessDeniedException();
}
Expand Down Expand Up @@ -142,7 +142,7 @@ public function modifyAction(Request $request) {
* Set up a form to present all the exams and let the user choose
* The one to modify
*/
public function modifytransAction(Request $request) {
public function modifytrans(Request $request) {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_EDIT)) {
throw new AccessDeniedException();
}
Expand Down Expand Up @@ -173,7 +173,7 @@ public function modifytransAction(Request $request) {
* Set up a form to present all the exams and let the user choose
* The one to modify
*/
public function modifyerrsAction(Request $request) {
public function modifyerrs(Request $request) {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_EDIT)) {
throw new AccessDeniedException();
}
Expand Down Expand Up @@ -206,7 +206,7 @@ public function modifyerrsAction(Request $request) {
* @param WebsiteFeeSubsEntity $subscriber
* @return RedirectResponse
*/
public function deleteAction(Request $request, WebsiteFeeSubsEntity $subscriber) : RedirectResponse {
public function delete(Request $request, WebsiteFeeSubsEntity $subscriber) : RedirectResponse {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_DELETE)) {
throw new AccessDeniedException();
}
Expand All @@ -233,7 +233,7 @@ public function deleteAction(Request $request, WebsiteFeeSubsEntity $subscriber)
* @param WebsiteFeeTransEntity|null $transaction
* @return Response
*/
public function deletetransAction(Request $request, WebsiteFeeTransEntity $transaction = null) : Response {
public function deletetrans(Request $request, WebsiteFeeTransEntity $transaction = null) : Response {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_DELETE)) {
throw new AccessDeniedException();
}
Expand Down Expand Up @@ -276,7 +276,7 @@ public function deletetransAction(Request $request, WebsiteFeeTransEntity $trans
* @param WebsiteFeeErrorsEntity|null $error
* @return Response
*/
public function deleteerrorAction(Request $request, WebsiteFeeErrorsEntity $error = null) : Response {
public function deleteerror(Request $request, WebsiteFeeErrorsEntity $error = null) : Response {
if (!$this->hasPermission('WebsiteFeeModule::', "::", ACCESS_DELETE)) {
throw new AccessDeniedException();
}
Expand Down
10 changes: 5 additions & 5 deletions Controller/SubscribeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class SubscribeController extends AbstractController {
private $response;
private $request;
private $listener;
private $debug = false;
private $debug = true;

/**
* @Route("")
*
* @return Response
*/
public function indexAction() : Response {
public function index() : Response {
//securtiy check first
if (!$this->hasPermission('quickcheck::', '::', ACCESS_OVERVIEW)) {
throw new AccessDeniedException();
Expand All @@ -70,7 +70,7 @@ public function indexAction() : Response {
* @param Request $request
* @return Response
*/
public function testsubscribeAction(Request $request) : Response {
public function testsubscribe(Request $request) : Response {
if($this->debug){
return $this->render('@PaustianWebsiteFeeModule/Subscribe/websitefee_subscribe_testsubscribe.html.twig',
['txnID' => bin2hex(random_bytes(8))]);
Expand All @@ -84,7 +84,7 @@ public function testsubscribeAction(Request $request) : Response {
* @param Request $request
* @return Response
*/
public function testupdategroupAction(Request $request) : Response {
public function testupdategroup(Request $request) : Response {
//This is a test function to try to debug update group
if($this->debug){
$this->_updateGroup(3, 3);
Expand All @@ -100,7 +100,7 @@ public function testupdategroupAction(Request $request) : Response {
* @return Response
* @throws Exception
*/
public function subscribepaypalAction(Request $request) : Response {
public function subscribepaypal(Request $request) : Response {
$this->listener = new IpnListener();
$this->paymentDate = urldecode($request->get('payment_date'));
$paymentDateTmp = strtotime($this->paymentDate);
Expand Down

0 comments on commit 07c0a63

Please sign in to comment.