Files
dpl/scripts/theme-fuc/integration-credit.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

10 lines
774 B
PHP

<?php
$app=require __DIR__.'/integration-bootstrap.php';
$email=$argv[1]??'';
if(!preg_match('/^qa-[0-9]+@example\.test$/D',$email))throw new RuntimeException('Only generated local acceptance accounts allowed');
App\Models\User::byEmail($email)->update(['commission_balance'=>2000]);
$suffix=explode('@',$email)[0];
App\Models\Coupon::firstOrCreate(['code'=>$suffix],['name'=>'Local QA coupon','type'=>1,'value'=>100,'show'=>true,'started_at'=>time()-60,'ended_at'=>time()+86400,'limit_plan_ids'=>[1]]);
$template=App\Models\GiftCardTemplate::firstOrCreate(['name'=>'Local QA balance'],['type'=>1,'status'=>true,'rewards'=>['balance'=>500],'admin_id'=>0]);
App\Models\GiftCardCode::firstOrCreate(['code'=>$suffix],['template_id'=>$template->id,'status'=>0,'max_usage'=>1]);