Migrate billing from Paddle to Lemon Squeezy

This commit is contained in:
Codex Agent
2026-02-03 10:59:54 +01:00
parent 2f4ebfefd4
commit a0ef90e13a
228 changed files with 4369 additions and 4067 deletions

View File

@@ -10,7 +10,7 @@ use App\Models\Tenant;
use App\Models\TenantPackage;
use App\Models\User;
use App\Notifications\Customer\WithdrawalConfirmed;
use App\Services\Paddle\PaddleTransactionService;
use App\Services\LemonSqueezy\LemonSqueezyOrderService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Notification;
use Inertia\Testing\AssertableInertia as Assert;
@@ -30,8 +30,8 @@ class WithdrawalConfirmationTest extends TestCase
$purchase = PackagePurchase::factory()->create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'provider' => 'paddle',
'provider_id' => 'txn_123',
'provider' => 'lemonsqueezy',
'provider_id' => 'ord_123',
'refunded' => false,
'type' => 'endcustomer_event',
'purchased_at' => now()->subDays(2),
@@ -60,8 +60,8 @@ class WithdrawalConfirmationTest extends TestCase
$purchase = PackagePurchase::factory()->create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'provider' => 'paddle',
'provider_id' => 'txn_456',
'provider' => 'lemonsqueezy',
'provider_id' => 'ord_456',
'refunded' => false,
'type' => 'endcustomer_event',
'purchased_at' => now()->subDays(5),
@@ -73,7 +73,7 @@ class WithdrawalConfirmationTest extends TestCase
'active' => true,
]);
$this->mock(PaddleTransactionService::class, function ($mock) {
$this->mock(LemonSqueezyOrderService::class, function ($mock) {
$mock->shouldReceive('refund')
->once()
->andReturn([]);
@@ -105,8 +105,8 @@ class WithdrawalConfirmationTest extends TestCase
$purchase = PackagePurchase::factory()->create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'provider' => 'paddle',
'provider_id' => 'txn_789',
'provider' => 'lemonsqueezy',
'provider_id' => 'ord_789',
'refunded' => false,
'type' => 'endcustomer_event',
'purchased_at' => now()->subDays(3),
@@ -120,7 +120,7 @@ class WithdrawalConfirmationTest extends TestCase
'purchased_at' => now(),
]);
$this->mock(PaddleTransactionService::class, function ($mock) {
$this->mock(LemonSqueezyOrderService::class, function ($mock) {
$mock->shouldReceive('refund')->never();
});