Inbox Processor / Handler
use ShipSaasInboxProcess\InboxProcessSetup;
// AppServiceProvider@boot
InboxProcessSetup::addProcessor(
'stripe',
StripeInvoiceWebhookHandler::class
);
InboxProcessSetup::addProcessor(
'stripe',
StripePaymentWebhookHandler::class
);class StripeInvoiceWebhookHandler
{
public function __construct(
private StripeClient $stripeClient
) {}
public function handle(array $payload): void
{
if ($payload['type'] !== 'invoice') {
return;
}
// handle this request
}
}Last updated