- $tipSaleForCheck = $usePromoWriteOff ? Promocode::TIP_SALE_PROMOBONUS : 'sale';
- $writeOffAlready = UsersBonus::find()->where(['lid_id' => $lid_id, 'phone' => $phone, 'tip_sale' => $tipSaleForCheck, 'tip' => 'minus'])->one() != null;
+ // TO8-22: Проверяем дубликат по ЛЮБОМУ tip_sale (sale или promobonus),
+ // чтобы повторный запрос с тем же check_id не начислил кэшбек
+ $writeOffAlready = UsersBonus::find()
+ ->where(['lid_id' => $lid_id, 'phone' => $phone, 'tip' => 'minus'])
+ ->andWhere(['in', 'tip_sale', ['sale', Promocode::TIP_SALE_PROMOBONUS]])
+ ->one() != null;