{"id":22170163,"url":"https://github.com/adyen/php-webhook-module","last_synced_at":"2025-07-26T13:32:45.755Z","repository":{"id":36972251,"uuid":"348695497","full_name":"Adyen/php-webhook-module","owner":"Adyen","description":"PHP Webhook Helper Module for Adyen Payment Integrations  ","archived":false,"fork":false,"pushed_at":"2025-07-14T07:11:54.000Z","size":130,"stargazers_count":6,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-07-17T21:10:32.344Z","etag":null,"topics":["adyen","payment-integration","php","webhook"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-17T12:08:50.000Z","updated_at":"2025-07-04T17:42:35.000Z","dependencies_parsed_at":"2023-12-15T21:43:34.039Z","dependency_job_id":"0974148d-8f45-4b00-9f0a-a29868d8e58f","html_url":"https://github.com/Adyen/php-webhook-module","commit_stats":{"total_commits":39,"total_committers":12,"mean_commits":3.25,"dds":0.717948717948718,"last_synced_commit":"d7b774575bee163ce7fbd17009a458fced94ccb6"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Adyen/php-webhook-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fphp-webhook-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fphp-webhook-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fphp-webhook-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fphp-webhook-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adyen","download_url":"https://codeload.github.com/Adyen/php-webhook-module/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fphp-webhook-module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267174883,"owners_count":24047711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adyen","payment-integration","php","webhook"],"created_at":"2024-12-02T06:39:18.252Z","updated_at":"2025-07-26T13:32:45.438Z","avatar_url":"https://github.com/Adyen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webhook Module for PHP \n\nAdyen library for handling notification webhooks.\n\n## Installation\nYou can use [Composer](https://getcomposer.org/). Follow the [installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have Composer installed.\n\n~~~~ bash\ncomposer require adyen/php-webhook-module\n~~~~\n\nIn your PHP script, make sure to include the autoloader:\n\n~~~~ php\nrequire __DIR__ . '/vendor/autoload.php';\n~~~~\n\nAlternatively, you can download the [release on GitHub](https://github.com/Adyen/php-webhook-module/releases).\n\n## Usage\n\n#### Authenticate and validate incoming webhook request:\n~~~~ php \n// Setup NotificationReceiver with dependency injection or create an instance as follows\n$notificationReceiver = new \\Adyen\\Webhook\\Receiver\\NotificationReceiver(new \\Adyen\\Webhook\\Receiver\\HmacSignature);\n\n// Authorize notification\nif (!$notificationReceiver-\u003eisAuthenticated(\n    $request['notificationItems'][0]['NotificationRequestItem'],\n    YOUR_MERCHANT_ACCOUNT,\n    YOUR_NOTIFICATION_USERNAME,\n    YOUR_NOTIFICATION_PASSWORD\n)) {\n    throw new AuthenticationException();\n}\n\n// Process each notification item\nforeach ($request['notificationItems'] as $notificationItem) {\n    // validate the notification\n    if ($notificationReceiver-\u003evalidateHmac($notificationItem, YOUR_HMAC_KEY)) {\n       // save notification to your database\n       $this-\u003edatabaseService-\u003esaveNotification($notificationItem); \n    }\n}\n\nreturn new JsonResponse('[accepted]');\n~~~~\n\n#### Process notification to get new payment state:\n~~~~ php \n$notificationItem = \\Adyen\\Webhook\\Notification::createItem([\n    'eventCode' =\u003e $notification['eventCode'],\n    'success' =\u003e $notification['success']\n]);\n\n$processor = \\Adyen\\Webhook\\Processor\\ProcessorFactory::create(\n    $notificationItem,\n    $currentPaymentState,\n    $this-\u003elogger\n);\n\n$newState = $processor-\u003eprocess();\n~~~~\nNB: set `$currentPaymentState` to one of the values in `\\Adyen\\Webhook\\PaymentStates`\n\n## Documentation\nVisit our [documentation page](https://docs.adyen.com/development-resources/webhooks/understand-notifications) to learn more about handling notifications.\n\n## Contributing\nWe encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.\nHave a look at our [contributing guidelines](https://github.com/Adyen/.github/blob/develop/CONTRIBUTING.md) to find out how to raise a pull request.\n\n## Support\nIf you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/Adyen/php-webhook-module/issues/new/choose).\nFor other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/requests/new?ticket_form_id=360000705420).\n\n## Licence\nThis repository is available under the [MIT license](https://github.com/Adyen/php-webhook-module/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fphp-webhook-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadyen%2Fphp-webhook-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fphp-webhook-module/lists"}