mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for gateway id
This commit is contained in:
parent
ae31a457da
commit
2193da9f6f
@ -66,12 +66,7 @@ class Settings
|
|||||||
default => $type = self::GATEWAY_CBA,
|
default => $type = self::GATEWAY_CBA,
|
||||||
};
|
};
|
||||||
|
|
||||||
if($type == self::GATEWAY_CBA && strlen($this->powerboard->company_gateway->getConfigField('gatewayId') ?? '') > 1){
|
|
||||||
return $this->powerboard->company_gateway->getConfigField('gatewayId');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->getGatewayByType($type);
|
return $this->getGatewayByType($type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getGatewayByType(string $gateway_type_const): mixed
|
private function getGatewayByType(string $gateway_type_const): mixed
|
||||||
@ -92,6 +87,11 @@ class Settings
|
|||||||
|
|
||||||
public function getGatewayId(int $gateway_type_id): string
|
public function getGatewayId(int $gateway_type_id): string
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ($gateway_type_id == GatewayType::CREDIT_CARD && strlen($this->powerboard->company_gateway->getConfigField('gatewayId') ?? '') > 1) {
|
||||||
|
return $this->powerboard->company_gateway->getConfigField('gatewayId');
|
||||||
|
}
|
||||||
|
|
||||||
$gateway = $this->getPaymentGatewayConfiguration($gateway_type_id);
|
$gateway = $this->getPaymentGatewayConfiguration($gateway_type_id);
|
||||||
|
|
||||||
return $gateway->_id;
|
return $gateway->_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user