Http::response(['balance_minor' => 50000]), ]); } public function test_free_registration_returns_success_url_without_session_cookie(): void { config(['link.public_domain' => 'ladl.link']); $owner = User::create([ 'public_id' => 'usr_reg_free', 'name' => 'Event Owner', 'email' => 'owner-reg-free@example.com', ]); QrCode::create([ 'user_id' => $owner->id, 'short_code' => 'webinar-demo', 'type' => QrCode::TYPE_EVENT, 'label' => 'Product webinar', 'payload' => [ 'content' => [ 'name' => 'Product webinar', 'mode' => 'free', 'format' => 'virtual', 'registration_open' => true, 'tiers' => [['name' => 'Registration', 'price' => 0, 'capacity' => 0]], 'virtual_sessions' => [ ['join_url' => 'https://meet.ladill.com/r/demo-room'], ], ], 'style' => [], ], 'is_active' => true, ]); $response = $this->postJson('/q/webinar-demo/register', [ 'tier' => 'Registration', 'attendee_name' => 'Jane Doe', 'attendee_email' => 'jane@example.com', 'attendee_phone' => '+233200000000', ], [ 'X-Ladill-Internal' => '1', ]); $response->assertOk() ->assertJsonPath('paid', false) ->assertJsonStructure(['success_url', 'badge_code']); $this->assertStringStartsWith( LadillLink::path('webinar-demo', 'registered/'), (string) $response->json('success_url') ); } }