PayPal\Api\Webhook::getAll PHP Method

getAll() public static method

Retrieves all Webhooks for the application associated with access token.
Deprecation: Please use Webhook#getAllWithParams instead.
public static getAll ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookList
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
return WebhookList
    public static function getAll($apiContext = null, $restCall = null)
    {
        return self::getAllWithParams(array(), $apiContext, $restCall);
    }

Usage Example

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     if (Config::get("customer_portal.paypal_enabled") !== true) {
         $this->error("PayPal is not enabled in the customer portal configuration.");
         return;
     }
     $apiContext = new ApiContext(new OAuthTokenCredential(Config::get("customer_portal.paypal_api_client_id"), Config::get("customer_portal.paypal_api_client_secret")));
     $apiContext->setConfig(['mode' => 'live', 'log.LogEnabled' => true, 'log.FileName' => storage_path("logs/paypal.log"), 'log.LogLevel' => 'ERROR']);
     try {
         Webhook::getAll($apiContext);
     } catch (Exception $e) {
         $this->error("Credentials failed! Please make sure this is a LIVE account and not a SANDBOX account and try again.");
         $this->error("Specific error was: {$e->getMessage()}");
         return;
     }
     $this->info("Credentials tested successfully.");
 }
All Usage Examples Of PayPal\Api\Webhook::getAll