geschenkgutscheine implementiert ("Paket verschenken"). Neuer Upload-Provider: Sparkbooth.

This commit is contained in:
Codex Agent
2025-12-07 16:54:58 +01:00
parent 3f3c0f1d35
commit 046e2fe3ec
50 changed files with 2422 additions and 130 deletions

View File

@@ -4,10 +4,13 @@ namespace App\Services\Coupons;
use App\Models\CheckoutSession;
use App\Models\CouponRedemption;
use App\Services\GiftVouchers\GiftVoucherService;
use Illuminate\Support\Arr;
class CouponRedemptionService
{
public function __construct(private readonly GiftVoucherService $giftVouchers) {}
public function recordSuccess(CheckoutSession $session, array $payload = []): void
{
if (! $session->coupon_id) {
@@ -41,6 +44,8 @@ class CouponRedemptionService
);
$session->coupon?->increment('redemptions_count');
$this->giftVouchers->markRedeemed($session->coupon, $transactionId);
}
public function recordFailure(CheckoutSession $session, string $reason): void