|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function updateCredit(Payment $payment): void |
|
|
public function updateCredit(Payment $payment): void |
|
|
{ |
|
|
{ |
|
|
if($payment->user) { |
|
|
|
|
|
|
|
|
if($payment->user && ( |
|
|
|
|
|
$payment->getType() == Payment::TYPE_DEBIT |
|
|
|
|
|
|| $payment->getType() == Payment::TYPE_CREDIT |
|
|
|
|
|
|| ($payment->getType() == Payment::TYPE_PAYMENT && $this->paymentSolver->isMeanPaymentCredit($payment)) |
|
|
|
|
|
|| ($payment->getType() == Payment::TYPE_REFUND && $this->paymentSolver->isMeanPaymentCredit($payment)) |
|
|
|
|
|
)) { |
|
|
|
|
|
|
|
|
$userProducer = $this->userProducerRepository->findOneUserProducer($payment->user); |
|
|
$userProducer = $this->userProducerRepository->findOneUserProducer($payment->user); |
|
|
|
|
|
|
|
|
if ($userProducer) { |
|
|
if ($userProducer) { |