Files
dpl/plugins/VipLoyalty/Commands/ReverseConsumption.php
T
hellcat 0501711267 feat(fuc-xb): prepare isolated staging theme and VIP auto upgrades
Port the Fuc 0.12.0 frontend and default-off VIP plugin. Include the previously approved password-reset token revocation. Deploy only to an independent FUC-XB test instance; no production cutover.
2026-11-04 13:44:33 +08:00

14 lines
819 B
PHP

<?php
namespace Plugin\VipLoyalty\Commands;
use Illuminate\Console\Command;
use Plugin\VipLoyalty\Service;
final class ReverseConsumption extends Command {
protected $signature='vip:reverse-consumption {order_id} {amount_cents} {reference}';
protected $description='仅登记已完成退款的VIP消费冲回,不执行退款、不动钱包';
public function handle(Service $service): int {
if(!ctype_digit($this->argument('order_id')) || !ctype_digit($this->argument('amount_cents'))) {$this->error('订单及金额须为正整数');return self::FAILURE;}
$service->reverse((int)$this->argument('order_id'),(int)$this->argument('amount_cents'),$this->argument('reference'));
$this->info('VIP消费已核对冲回;未执行付款或钱包退款。');return self::SUCCESS;
}
}