mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
25 lines
738 B
PHP
25 lines
738 B
PHP
|
<?php namespace App\Ninja\PaymentDrivers;
|
||
|
|
||
|
class DwollaPaymentDriver extends BasePaymentDriver
|
||
|
{
|
||
|
protected function gatewayTypes()
|
||
|
{
|
||
|
return [GATEWAY_TYPE_DWOLLA];
|
||
|
}
|
||
|
|
||
|
protected function gateway()
|
||
|
{
|
||
|
$gateway = parent::gateway();
|
||
|
|
||
|
if ($gateway->getSandbox() && isset($_ENV['DWOLLA_SANDBOX_KEY']) && isset($_ENV['DWOLLA_SANSBOX_SECRET'])) {
|
||
|
$gateway->setKey($_ENV['DWOLLA_SANDBOX_KEY']);
|
||
|
$gateway->setSecret($_ENV['DWOLLA_SANSBOX_SECRET']);
|
||
|
} elseif (isset($_ENV['DWOLLA_KEY']) && isset($_ENV['DWOLLA_SECRET'])) {
|
||
|
$gateway->setKey($_ENV['DWOLLA_KEY']);
|
||
|
$gateway->setSecret($_ENV['DWOLLA_SECRET']);
|
||
|
}
|
||
|
|
||
|
return $gateway;
|
||
|
}
|
||
|
}
|