public function get($paymentType, $carrier, $gds, $clearingCompany, $allowDirectPayment)
{
AcqData::preload();
$carrier = strtoupper($carrier);
if($paymentType == 'cc') {
$gdsVal = $this->acqData->getGdsVal($gds);
if(!$allowDirectPayment ||
!$gdsVal ||
!isset($gdsVal['lr'], $gdsVal['direct'], $gdsVal['lr_commission_acq'], $gdsVal['direct_commission_acq'])
) {
$ccDefaultVal = $this->acqData->getPaymentTypeVal($paymentType);
return [[$ccDefaultVal, $ccDefaultVal], false];
}
$commission = $gdsVal['direct_commission_acq'];
$isDirect = $this->isDirect($carrier, $gds, $clearingCompany);
if(!$isDirect) {
$gdsVal['direct'] = $gdsVal['lr'];
$commission = $gdsVal['lr'];
}
return [
[$gdsVal['direct'], $commission],
$isDirect
];
}
$paymentTypeVal = $this->acqData->getPaymentTypeVal($paymentType);
return [
[$paymentTypeVal, $paymentTypeVal],
false
];
}
$ccDefaultVal = $this->acqData->getPaymentTypeVal($paymentType); is duplicated in two branches...