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

@@ -4,10 +4,10 @@ namespace Tests\Unit;
use App\Enums\CouponType;
use App\Jobs\SyncCouponToPaddle;
use App\Mail\GiftVoucherIssued;
use App\Models\Coupon;
use App\Models\GiftVoucher;
use App\Models\Package;
use App\Mail\GiftVoucherIssued;
use App\Services\GiftVouchers\GiftVoucherService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Bus;
@@ -35,7 +35,7 @@ class GiftVoucherServiceTest extends TestCase
'amount' => 5900,
],
],
'metadata' => [
'custom_data' => [
'type' => 'gift_card',
'purchaser_email' => 'buyer@example.com',
'recipient_email' => 'friend@example.com',
@@ -104,7 +104,7 @@ class GiftVoucherServiceTest extends TestCase
'amount' => 2900,
],
],
'metadata' => [
'custom_data' => [
'type' => 'gift_voucher',
'purchaser_email' => 'buyer@example.com',
'recipient_email' => 'friend@example.com',