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:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user