diff --git a/src/angelleye/PayPal/rest/notifications/NotificationsAPI.php b/src/angelleye/PayPal/rest/notifications/NotificationsAPI.php index fea6428e..b3811e47 100644 --- a/src/angelleye/PayPal/rest/notifications/NotificationsAPI.php +++ b/src/angelleye/PayPal/rest/notifications/NotificationsAPI.php @@ -100,6 +100,9 @@ public function CreateWebhook($requestData){ $returnArray['RAWRESPONSE']=$output->toJSON(); return $returnArray; } + catch (Exception $ex) { + return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { return $this->createErrorResponse($ex); } @@ -121,6 +124,8 @@ public function ListWebhooks($requestData){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -140,6 +145,8 @@ public function GetWebhook($webhook_id){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -161,6 +168,8 @@ public function DeleteWebhook($webhook_id){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -212,6 +221,8 @@ public function UpdateWebhook($webhook_id,$requestData){ } } catch (\PayPal\Exception\PayPalConnectionException $ex) { return $this->createErrorResponse($ex); + } catch (Exception $ex) { + return $this->createErrorResponse($ex); } } @@ -232,6 +243,8 @@ public function SearchWebhookEvents($params){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -251,6 +264,8 @@ public function EventNotificationDetails($event_id){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -272,6 +287,8 @@ public function ResendEventNotification($event_id){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -291,6 +308,8 @@ public function WebhooksEventTypes(){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -311,6 +330,8 @@ public function WebhooksEventTypesById($webhook_id){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -342,6 +363,8 @@ public function VerifyWebhookSignature($headers,$webhook_id,$request_body){ } catch (Exception $ex){ return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } } @@ -363,6 +386,8 @@ public function SimulateEvent($params){ return $returnArray; } catch (Exception $ex) { return $this->createErrorResponse($ex); + } catch (\PayPal\Exception\PayPalConnectionException $ex) { + return $this->createErrorResponse($ex); } }