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.
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 addSubscriberInterface
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.