- Add nullable debt field to User entity with addDebt/reduceDebt helpers - On refund webhook: add refunded amount to organizer debt - On dispute webhook (charge.dispute.created): add disputed amount to debt - OrderController: if organizer has debt > 0, payment goes to main Stripe account instead of connected account, debt reduced on payment success - Display debt amount on organizer dashboard with warning message - Add dispute notification email template - Migration for debt column on user table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
581 B
PHP
27 lines
581 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260325090632 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Add debt field to user table for refund/dispute tracking';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE "user" ADD debt INT DEFAULT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE "user" DROP debt');
|
|
}
|
|
}
|