mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge GoCardless fix
This commit is contained in:
parent
ebb2d039d6
commit
d9b8553b79
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Ninja\PaymentDrivers;
|
namespace App\Ninja\PaymentDrivers;
|
||||||
|
|
||||||
|
use Omnipay;
|
||||||
use Session;
|
use Session;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
|
|
||||||
@ -19,6 +20,23 @@ class GoCardlessV2RedirectPaymentDriver extends BasePaymentDriver
|
|||||||
return $types;
|
return $types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Workaround for access_token/accessToken issue
|
||||||
|
protected function gateway()
|
||||||
|
{
|
||||||
|
if ($this->gateway) {
|
||||||
|
return $this->gateway;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->gateway = Omnipay::create($this->accountGateway->gateway->provider);
|
||||||
|
|
||||||
|
$config = (array) $this->accountGateway->getConfig();
|
||||||
|
$config['access_token'] = $config['accessToken'];
|
||||||
|
$config['secret'] = $config['webhookSecret'];
|
||||||
|
$this->gateway->initialize($config);
|
||||||
|
|
||||||
|
return $this->gateway;
|
||||||
|
}
|
||||||
|
|
||||||
protected function paymentDetails($paymentMethod = false)
|
protected function paymentDetails($paymentMethod = false)
|
||||||
{
|
{
|
||||||
$data = parent::paymentDetails($paymentMethod);
|
$data = parent::paymentDetails($paymentMethod);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user