feat(ticket): implement validity time management for tickets and catalog items
- Added ValidityTime model and migration to manage ticket validity periods. - Updated TicketGeneratorService to resolve and assign validity times to tickets. - Refactored ticket generation logic to remove legacy date fields and use validity time. - Introduced timezone support for tenants to handle service dates correctly. - Updated migrations to remove deprecated columns and add foreign keys for validity times. - Modified seeders and tests to accommodate new validity time structure. - Enhanced tests to validate ticket generation and validity time behavior.
This commit is contained in:
@@ -259,7 +259,7 @@ class TelepagosWebhookTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_webhook_confirms_a_purchase_when_its_ticket_use_date_has_ended(): void
|
||||
public function test_webhook_confirms_a_purchase_with_tickets_enabled(): void
|
||||
{
|
||||
$tenant = $this->createTenant('expired-ticket', 'Expired Ticket', 'expired-ticket.com.ar');
|
||||
$this->configureTelepagosIntegration($tenant);
|
||||
@@ -267,7 +267,6 @@ class TelepagosWebhookTest extends TestCase
|
||||
$variant = $this->createVariantForTenant('expired-ticket', 1, '50.00');
|
||||
$variant->catalogItem->update([
|
||||
'has_tickets' => true,
|
||||
'maximum_use_date' => now()->subMinute(),
|
||||
]);
|
||||
$purchase = $this->createPendingTransferPurchase(
|
||||
$tenant,
|
||||
|
||||
Reference in New Issue
Block a user