- Tenant-Admin-PWA: Neues /event-admin/welcome Onboarding mit WelcomeHero, Packages-, Order-Summary- und Event-Setup-Pages, Zustandsspeicher, Routing-Guard und Dashboard-CTA für Erstnutzer; Filament-/admin-Login via Custom-View behoben.
- Brand/Theming: Marketing-Farb- und Typographievariablen in `resources/css/app.css` eingeführt, AdminLayout, Dashboardkarten und Onboarding-Komponenten entsprechend angepasst; Dokumentation (`docs/todo/tenant-admin-onboarding-fusion.md`, `docs/changes/...`) aktualisiert. - Checkout & Payments: Checkout-, PayPal-Controller und Tests für integrierte Stripe/PayPal-Flows sowie Paket-Billing-Abläufe überarbeitet; neue PayPal SDK-Factory und Admin-API-Helper (`resources/js/admin/api.ts`) schaffen Grundlage für Billing/Members/Tasks-Seiten. - DX & Tests: Neue Playwright/E2E-Struktur (docs/testing/e2e.md, `tests/e2e/tenant-onboarding-flow.test.ts`, Utilities), E2E-Tenant-Seeder und zusätzliche Übersetzungen/Factories zur Unterstützung der neuen Flows. - Marketing-Kommunikation: Automatische Kontakt-Bestätigungsmail (`ContactConfirmation` + Blade-Template) implementiert; Guest-PWA unter `/event` erreichbar. - Nebensitzung: Blogsystem gefixt und umfassenden BlogPostSeeder für Beispielinhalte angelegt.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Services\Checkout;
|
||||
|
||||
use App\Mail\PurchaseConfirmation;
|
||||
use App\Mail\Welcome;
|
||||
use App\Models\CheckoutSession;
|
||||
use App\Models\AbandonedCheckout;
|
||||
use App\Models\Package;
|
||||
use App\Models\PackagePurchase;
|
||||
use App\Models\Tenant;
|
||||
@@ -83,6 +85,19 @@ class CheckoutAssignmentService
|
||||
|
||||
if ($user) {
|
||||
Mail::to($user)->queue(new Welcome($user));
|
||||
|
||||
if ($purchase->wasRecentlyCreated) {
|
||||
Mail::to($user)->queue(new PurchaseConfirmation($purchase));
|
||||
}
|
||||
|
||||
AbandonedCheckout::query()
|
||||
->where('user_id', $user->id)
|
||||
->where('package_id', $package->id)
|
||||
->where('converted', false)
|
||||
->update([
|
||||
'converted' => true,
|
||||
'reminder_stage' => 'converted',
|
||||
]);
|
||||
}
|
||||
|
||||
Log::info('Checkout session assigned', [
|
||||
@@ -141,4 +156,4 @@ class CheckoutAssignmentService
|
||||
'pending_purchase' => false,
|
||||
])->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
27
app/Services/PayPal/PaypalClientFactory.php
Normal file
27
app/Services/PayPal/PaypalClientFactory.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\PayPal;
|
||||
|
||||
use PaypalServerSdkLib\PaypalServerSdkClient;
|
||||
use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
|
||||
use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
|
||||
use PaypalServerSdkLib\Environment;
|
||||
|
||||
class PaypalClientFactory
|
||||
{
|
||||
public function make(?bool $sandbox = null, ?string $clientId = null, ?string $clientSecret = null): PaypalServerSdkClient
|
||||
{
|
||||
$clientId = $clientId ?? config('services.paypal.client_id');
|
||||
$clientSecret = $clientSecret ?? config('services.paypal.secret');
|
||||
$isSandbox = $sandbox ?? config('services.paypal.sandbox', true);
|
||||
|
||||
$environment = $isSandbox ? Environment::SANDBOX : Environment::PRODUCTION;
|
||||
|
||||
return PaypalServerSdkClientBuilder::init()
|
||||
->clientCredentialsAuthCredentials(
|
||||
ClientCredentialsAuthCredentialsBuilder::init($clientId, $clientSecret)
|
||||
)
|
||||
->environment($environment)
|
||||
->build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user