Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 1.97 KB

README.md

File metadata and controls

64 lines (40 loc) · 1.97 KB

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.