mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for gocardless invalid credentials
This commit is contained in:
parent
f80767bcfc
commit
814ac115e8
@ -98,10 +98,17 @@ class GoCardlessPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function init(): self
|
public function init(): self
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$this->gateway = new \GoCardlessPro\Client([
|
$this->gateway = new \GoCardlessPro\Client([
|
||||||
'access_token' => $this->company_gateway->getConfigField('accessToken'),
|
'access_token' => $this->company_gateway->getConfigField('accessToken'),
|
||||||
'environment' => $this->company_gateway->getConfigField('testMode') ? \GoCardlessPro\Environment::SANDBOX : \GoCardlessPro\Environment::LIVE,
|
'environment' => $this->company_gateway->getConfigField('testMode') ? \GoCardlessPro\Environment::SANDBOX : \GoCardlessPro\Environment::LIVE,
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
catch(\GoCardlessPro\Core\Exception\AuthenticationException $e){
|
||||||
|
|
||||||
|
throw new \Exception('GoCardless: Invalid Access Token', 403);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user