eonx-com / webhooks

The EoneoPay Webhook
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Feature/PYMT-453 webhooks implementation #7

Closed merk closed 5 years ago

merk commented 5 years ago

The primary entry point is the Webhook service, which has a function signature of )$constant, $sequence, $payload, $subscribers).

Users of webhooks will need to create a service that implements SubscriptionRetrieverInterface, and add SubscriberInterface to the objects that can subscribe to webhooks, and SubscriptionInterface to objects that represent a single subscription to a constant.

I suggest that webhooks be stored globally as constants in a final class, but until I actually implement things in Payments I'm not sure where it should go.