Änderungen (relevant):

- Add‑on Checkout auf Transactions + Transaction‑ID speichern: app/Services/Addons/EventAddonCheckoutService.php
  - Paket/Marketing Checkout auf Transactions: app/Services/Paddle/PaddleCheckoutService.php
  - Gift‑Voucher Checkout: Customer anlegen/finden + Transactions: app/Services/GiftVouchers/
    GiftVoucherCheckoutService.php
  - Tests aktualisiert: tests/Feature/Tenant/EventAddonCheckoutTest.php, tests/Unit/PaddleCheckoutServiceTest.php,
tests/Unit/GiftVoucherCheckoutServiceTest.php
This commit is contained in:
Codex Agent
2025-12-29 18:04:28 +01:00
parent 795e37ee12
commit 5f521d055f
26 changed files with 783 additions and 102 deletions

View File

@@ -27,11 +27,17 @@ class EventAddonCheckoutTest extends TenantTestCase
// Fake Paddle response
Http::fake([
'*/checkout/links' => Http::response([
'*/customers' => Http::response([
'data' => [
'url' => 'https://checkout.paddle.test/abcd',
'id' => 'chk_addon_123',
'expires_at' => now()->addHour()->toIso8601String(),
'id' => 'ctm_addon_123',
],
], 200),
'*/transactions' => Http::response([
'data' => [
'id' => 'txn_addon_123',
'checkout' => [
'url' => 'https://checkout.paddle.test/abcd',
],
],
], 200),
]);
@@ -67,14 +73,14 @@ class EventAddonCheckoutTest extends TenantTestCase
]);
$response->assertOk();
$response->assertJsonPath('checkout_id', 'chk_addon_123');
$response->assertJsonPath('checkout_id', 'txn_addon_123');
$this->assertDatabaseHas('event_package_addons', [
'event_package_id' => $eventPackage->id,
'addon_key' => 'extra_photos_small',
'status' => 'pending',
'quantity' => 2,
'checkout_id' => 'chk_addon_123',
'transaction_id' => 'txn_addon_123',
]);
$addon = EventPackageAddon::where('event_package_id', $eventPackage->id)->latest()->first();