Fix PayPal billing flow and mobile admin UX
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-05 10:19:29 +01:00
parent c43327af74
commit 0d7a861875
39 changed files with 1630 additions and 253 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace Tests\Feature\Api\Tenant;
use App\Models\Package;
use App\Models\PackagePurchase;
use Tests\Feature\Tenant\TenantTestCase;
class BillingReceiptTest extends TenantTestCase
{
public function test_receipt_endpoint_returns_pdf(): void
{
$package = Package::factory()->create(['name' => 'Starter']);
$purchase = PackagePurchase::factory()->create([
'tenant_id' => $this->tenant->id,
'package_id' => $package->id,
'provider' => 'paypal',
'provider_id' => 'ORDER-123',
'price' => 49.0,
]);
$response = $this->authenticatedRequest('GET', '/api/v1/tenant/billing/transactions/'.$purchase->id.'/receipt');
$response->assertOk();
$response->assertHeader('Content-Type', 'application/pdf');
}
}