Check Braintree credentials when adding gateway
This commit is contained in:
parent
109d684437
commit
21dc46b8da
1 changed files with 11 additions and 0 deletions
|
|
@ -212,4 +212,15 @@ class BraintreePaymentDriver extends BasePaymentDriver
|
|||
->send()
|
||||
->getToken();
|
||||
}
|
||||
|
||||
public function isValid()
|
||||
{
|
||||
try {
|
||||
$this->createTransactionToken();
|
||||
return true;
|
||||
} catch (Exception $exception) {
|
||||
return get_class($exception);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue