From 5eef7144123a4b7c7a9d704647eb444281624856 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 27 Oct 2021 10:25:48 +0200 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- .../files/lib/action/PaypalCallbackAction.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php index 3d32d56177..db1801f2ce 100644 --- a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php +++ b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php @@ -49,13 +49,13 @@ class PaypalCallbackAction extends AbstractAction $response = $client->send($request); $content = (string)$response->getBody(); } catch (ClientExceptionInterface $e) { - throw new SystemException('connection to paypal.com failed: ' . $e->getMessage()); + throw new \Exception('PayPal IPN validation request failed: ' . $e->getMessage(), 0, $e); } if (\strpos($content, "VERIFIED") === false) { - throw new SystemException('request not validated'); + throw new \Exception("PayPal IPN validation did not return 'VERIFIED'."); } - } catch (SystemException $e) { + } catch (\Exception $e) { \wcf\functions\exception\logThrowable($e); return new EmptyResponse(500); } @@ -127,7 +127,7 @@ class PaypalCallbackAction extends AbstractAction } $this->executed(); - } catch (SystemException $e) { + } catch (\Exception $e) { \wcf\functions\exception\logThrowable($e); } -- 2.20.1