Skip to content

PHP library to simplify server implementations for receiving webhooks from Upmind

License

Notifications You must be signed in to change notification settings

upmind-automation/webhook-endpoint

Repository files navigation

Upmind Automation - PHP Webhook Endpoint

Latest Version on Packagist GitHub Tests Action Status

Refer to the Upmind Webhooks guide to discover how to configure your first webhook endpoint.

Installation

composer require upmind/webhook-endpoint

Requirements

  • PHP (7.4, 8.0, 8.1, 8.2)
  • Composer

Usage

The Examples directory contains sample code for how to use this library to implement your endpoint and consume Upmind webhooks.

Quick-start

The following example shows how to consume and authenticate webhooks using plain PHP:

$endpointSecret = 'xxxxxxxxxx';
$factory = new \Upmind\Webhooks\WebhookFactory($endpointSecret);
try {
// get the webhook instance and authenticate it
$webhook = $factory->create();
$webhook->assertValidAuth();
} catch (\Upmind\Webhooks\Exceptions\WebhookException $e) {
http_response_code($e->getHttpCode());
exit($e->getMessage());
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

GNU General Public License version 3 (GPLv3). Please see License File for more information.

Upmind

Sell, manage and support web hosting, domain names, ssl certificates, website builders and more with Upmind.com.

About

PHP library to simplify server implementations for receiving webhooks from Upmind

Resources

License

Stars

Watchers

Forks

Packages

No packages published