feat: improved promotional and purchase vouchers
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Validator\Constraints;
|
||||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
/**
|
||||
* Validates purchase voucher codes via BPN API.
|
||||
*
|
||||
* Checks that the voucher exists and has remaining balance.
|
||||
* Applied at ParticipantEditDto level to access booking context.
|
||||
*/
|
||||
#[\Attribute]
|
||||
class PurchaseVoucher extends Constraint
|
||||
{
|
||||
public string $message = 'Gutschein ungültig: {{ error }}';
|
||||
|
||||
public function getTargets(): array|string
|
||||
{
|
||||
return static::CLASS_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user