mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Test routes for gateways
This commit is contained in:
parent
1595c9d1f7
commit
5f1e1ac174
@ -195,4 +195,9 @@ class AuthorizePaymentDriver extends BaseDriver
|
||||
{
|
||||
return (new AuthorizeCustomer($this))->importCustomers();
|
||||
}
|
||||
|
||||
public function auth(): bool
|
||||
{
|
||||
return $this->init()->getPublicClientKey() ?? false;
|
||||
}
|
||||
}
|
||||
|
@ -806,4 +806,9 @@ class BaseDriver extends AbstractPaymentDriver
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function auth(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -420,4 +420,20 @@ class MolliePaymentDriver extends BaseDriver
|
||||
{
|
||||
return \number_format((float) $amount, 2, '.', '');
|
||||
}
|
||||
|
||||
public function auth(): bool
|
||||
{
|
||||
$this->init();
|
||||
|
||||
try {
|
||||
$p = $this->gateway->payments->page();
|
||||
return true;
|
||||
}
|
||||
catch(\Exception $e){
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -990,4 +990,20 @@ class StripePaymentDriver extends BaseDriver
|
||||
return mb_convert_encoding(pack('H*', $matches[1]), 'UTF-8', 'UCS-2BE');
|
||||
}, $string);
|
||||
}
|
||||
|
||||
public function auth(): bool
|
||||
{
|
||||
$this->init();
|
||||
|
||||
try {
|
||||
$this->verifyConnect();
|
||||
return true;
|
||||
}
|
||||
catch(\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user