Updated checkout to wait for backend confirmation before advancing, added a “Processing payment…” state with retry/ refresh fallback, and now use Paddle totals/currency for purchase records + confirmation emails (with new email translations).

This commit is contained in:
Codex Agent
2025-12-22 09:06:48 +01:00
parent 41d29eb7d3
commit 84234bfb8e
36 changed files with 1742 additions and 187 deletions

View File

@@ -9,6 +9,8 @@ use App\Models\TenantPackage;
use App\Services\Checkout\CheckoutAssignmentService;
use App\Services\Checkout\CheckoutSessionService;
use App\Services\Checkout\CheckoutWebhookService;
use App\Services\Coupons\CouponRedemptionService;
use App\Services\GiftVouchers\GiftVoucherService;
use App\Services\Paddle\PaddleSubscriptionService;
use Carbon\Carbon;
use Illuminate\Foundation\Testing\RefreshDatabase;
@@ -80,11 +82,15 @@ class PackageSoftDeleteTest extends TestCase
$sessionService = Mockery::mock(CheckoutSessionService::class);
$assignmentService = Mockery::mock(CheckoutAssignmentService::class);
$subscriptionService = Mockery::mock(PaddleSubscriptionService::class);
$couponRedemptions = Mockery::mock(CouponRedemptionService::class);
$giftVouchers = Mockery::mock(GiftVoucherService::class);
$service = new CheckoutWebhookService(
$sessionService,
$assignmentService,
$subscriptionService
$subscriptionService,
$couponRedemptions,
$giftVouchers
);
Carbon::setTestNow(now());
@@ -94,7 +100,7 @@ class PackageSoftDeleteTest extends TestCase
'data' => [
'id' => 'sub_123',
'status' => 'active',
'metadata' => [
'custom_data' => [
'tenant_id' => $tenant->id,
'package_id' => $package->id,
],