Skip to content

v1.1.2

Choose a tag to compare

@nokimaro nokimaro released this 05 Apr 04:01
· 6 commits to master since this release
d1a5fe3

New Features

  • Added WebhookPayload DTO for parsing incoming webhook notifications via WebhookPayload::fromJson($json)
  • Added WebhookError DTO with hasError() helper
  • Added WebhookEventType enum

Usage

$webhook = WebhookPayload::fromJson(file_get_contents('php://input'));

if ($webhook->payment->isSuccessful()) {
    // fulfil the order
}

if ($webhook->error?->hasError()) {
    // log $webhook->error->description
}

What's Changed

  • feat: add WebhookPayload DTO for parsing incoming webhook notifications by @nokimaro in #10

Full Changelog: v1.1.1...v1.1.2