diff --git a/_define.php b/_define.php index 3e37271..9143ac9 100644 --- a/_define.php +++ b/_define.php @@ -26,7 +26,7 @@ 'Paypal integration', //Short description 'Johan Cwiklinski', //Author '2.2.0', //Version - '1.2.0', //Galette compatible version + '1.2.1', //Galette compatible version 'paypal', //routing name and translation domain '2025-10-09', //Release date [ //Permissions needed diff --git a/lib/GalettePaypal/Controllers/PaypalController.php b/lib/GalettePaypal/Controllers/PaypalController.php index 03b6413..6bcfa9e 100644 --- a/lib/GalettePaypal/Controllers/PaypalController.php +++ b/lib/GalettePaypal/Controllers/PaypalController.php @@ -434,8 +434,7 @@ public function notify(Request $request, Response $response): Response //all goes well, we can proceed if ($real_contrib) { - $store = false; - $valid = $contrib->check($post, [], []); + $valid = $contrib->setNoCheckLogin()->check($post, [], []); if ($valid !== true) { Analog::log( 'An error occurred while storing a new contribution from Paypal payment:' @@ -446,8 +445,7 @@ public function notify(Request $request, Response $response): Response return $response->withStatus(500, 'Internal error'); } - $store = $contrib->store(); - if ($store === true) { + if ($contrib->store()) { //contribution has been stored :) Analog::log( 'Paypal payment has been successfully registered as a contribution', diff --git a/lib/GalettePaypal/PluginGalettePaypal.php b/lib/GalettePaypal/PluginGalettePaypal.php index ea72aeb..7584768 100644 --- a/lib/GalettePaypal/PluginGalettePaypal.php +++ b/lib/GalettePaypal/PluginGalettePaypal.php @@ -102,7 +102,7 @@ public static function getDashboardsContents(): array global $preferences; $contents = []; - if ($preferences->showPublicPages($login)) { + if ($preferences->showPublicPage($login, 'pref_publicpages_visibility_generic')) { $contents[] = [ 'label' => _T("Payment form", "paypal"), 'route' => [