(string) Str::uuid(), 'name' => 'Vendor', 'email' => 'vendor-cors@example.com', ]); $qr = QrCode::query()->create([ 'user_id' => $user->id, 'short_code' => 'paycors01', 'type' => QrCode::TYPE_PAYMENT, 'label' => 'Till', 'payload' => [ 'content' => [ 'business_name' => 'Accra Kiosk', 'currency' => 'GHS', ], 'style' => [], ], 'is_active' => true, ]); $html = $this->withHeader(\App\Support\LadillLink::INTERNAL_HEADER, '1') ->get('/q/'.$qr->short_code) ->assertOk() ->getContent(); $this->assertStringContainsString('paycors01/pay', $html); $this->assertStringNotContainsString('https://mini.ladill.com/q/paycors01/pay', $html); } public function test_payment_landing_redirects_non_internal_to_public_host(): void { $user = User::create([ 'public_id' => (string) Str::uuid(), 'name' => 'Vendor', 'email' => 'vendor-mode@example.com', ]); $qr = QrCode::query()->create([ 'user_id' => $user->id, 'short_code' => 'paymode1', 'type' => QrCode::TYPE_PAYMENT, 'label' => 'Till', 'payload' => [ 'content' => [ 'business_name' => 'Accra Kiosk', 'currency' => 'GHS', ], 'style' => [], ], 'is_active' => true, ]); // Direct hit (no internal header) is redirected to ladl.link by legacy middleware. $this->get('/q/'.$qr->short_code)->assertRedirect(); } }