Redesign the Payment view page infolist

Groups fields into Payment/Timeline sections with icons, copyable IDs, and
a money-formatted amount. Drops the permission-gated Gateway Response
section (raw gateway_payload) and its two visibility tests along with it.
This commit is contained in:
Nyan Lin Paing
2026-08-30 15:46:19 +07:00
parent bebcab88fa
commit 95b369174d
2 changed files with 33 additions and 43 deletions
@@ -56,25 +56,3 @@ test('can view a payment\'s detail page', function () {
->assertSee($booking->booking_ref)
->assertSee('EVB-VIEWTEST-1');
});
test('the gateway response is visible to a user with process_refunds', function () {
$admin = User::factory()->create()->givePermissionTo(['view_payments', 'process_refunds']);
$this->actingAs($admin);
$payment = Payment::factory()->create(['gateway_payload' => ['prepay_id' => 'PREPAY-SECRET-123']]);
Livewire::test(ViewPayment::class, ['record' => $payment->getRouteKey()])
->assertOk()
->assertSee('PREPAY-SECRET-123');
});
test('the gateway response is hidden from a user without process_refunds', function () {
$support = User::factory()->create()->givePermissionTo('view_payments');
$this->actingAs($support);
$payment = Payment::factory()->create(['gateway_payload' => ['prepay_id' => 'PREPAY-SECRET-123']]);
Livewire::test(ViewPayment::class, ['record' => $payment->getRouteKey()])
->assertOk()
->assertDontSee('PREPAY-SECRET-123');
});