mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:24:29 -04:00
Update CBA powerboard settings after a gateway update
This commit is contained in:
parent
06f0213845
commit
b91b1fca7c
@ -57,6 +57,7 @@ class CompanyGatewayController extends BaseController
|
|||||||
|
|
||||||
private string $forte_key = 'kivcvjexxvdiyqtj3mju5d6yhpeht2xs';
|
private string $forte_key = 'kivcvjexxvdiyqtj3mju5d6yhpeht2xs';
|
||||||
|
|
||||||
|
private string $cbapowerboard_key = 'b67581d804dbad1743b61c57285142ad';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CompanyGatewayController constructor.
|
* CompanyGatewayController constructor.
|
||||||
@ -227,17 +228,35 @@ class CompanyGatewayController extends BaseController
|
|||||||
|
|
||||||
ApplePayDomain::dispatch($company_gateway, $company_gateway->company->db);
|
ApplePayDomain::dispatch($company_gateway, $company_gateway->company->db);
|
||||||
|
|
||||||
if (in_array($company_gateway->gateway_key, $this->stripe_keys)) {
|
switch ($company_gateway->gateway_key) {
|
||||||
StripeWebhook::dispatch($company_gateway->company->company_key, $company_gateway->id);
|
case in_array($company_gateway->gateway_key, $this->stripe_keys):
|
||||||
} elseif($company_gateway->gateway_key == $this->checkout_key) {
|
StripeWebhook::dispatch($company_gateway->company->company_key, $company_gateway->id);
|
||||||
CheckoutSetupWebhook::dispatch($company_gateway->company->company_key, $company_gateway->id);
|
break;
|
||||||
} elseif($company_gateway->gateway_key == $this->forte_key) {
|
|
||||||
|
|
||||||
dispatch(function () use ($company_gateway) {
|
case $this->checkout_key:
|
||||||
MultiDB::setDb($company_gateway->company->db);
|
CheckoutSetupWebhook::dispatch($company_gateway->company->company_key, $company_gateway->id);
|
||||||
$company_gateway->driver()->updateFees();
|
break;
|
||||||
})->afterResponse();
|
|
||||||
|
|
||||||
|
case $this->forte_key:
|
||||||
|
dispatch(function () use ($company_gateway) {
|
||||||
|
MultiDB::setDb($company_gateway->company->db);
|
||||||
|
$company_gateway->driver()->updateFees();
|
||||||
|
})->afterResponse();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case $this->cbapowerboard_key:
|
||||||
|
dispatch(function () use ($company_gateway) {
|
||||||
|
MultiDB::setDb($company_gateway->company->db);
|
||||||
|
$company_gateway->driver()->init()->settings()->updateSettings();
|
||||||
|
})->afterResponse();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->itemResponse($company_gateway);
|
return $this->itemResponse($company_gateway);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user