'ul_transaction_default', 'actionType' => 'create', 'eventTime' => '2022-01-12T00:00:00', 'data' => [] ] ]; expect(WebhookFactory::isBaas($payload))->toBeTrue(); $webhook = WebhookFactory::create($payload); expect($webhook)->toBeInstanceOf(BaasWebhookData::class) ->and($webhook->object)->toBe('ul_transaction_default'); }); test('can detect sbp webhook', function () { $payload = [ 'command' => 'qrc/notification', 'status' => 'ACWP', 'qrcId' => 'test-id' ]; expect(WebhookFactory::isSbp($payload))->toBeTrue(); $webhook = WebhookFactory::create($payload); expect($webhook)->toBeInstanceOf(SbpWebhookData::class) ->and($webhook->command)->toBe('qrc/notification'); });