1
0
Fork 0
mirror of synced 2025-04-18 16:41:02 +00:00

add confirmation bonus adding

This commit is contained in:
Sergey Chazov 2020-10-20 17:52:32 +03:00 committed by Neur0toxine
parent f2abca9dc6
commit b68d0bcf37

View file

@ -179,7 +179,17 @@ class EventsHandlers
$newPayment = $paymentCollection->createItem($service);
$newPayment->setField('SUM', $bonusCount);
$newPayment->setPaid('Y');
//если верификация необходима, но не пройдена
if (isset($response->verification) && !isset($response->verification->verifiedAt)) {
$newPayment->setPaid('N');
}
//если верификация не нужна
if (!isset($response->verification)) {
$newPayment->setPaid('Y');
}
$order->save();
}
} catch (ObjectPropertyException | ArgumentException | SystemException | Exception $e) {