Check Braintree credentials when adding gateway

This commit is contained in:
Hillel Coren 2017-09-03 10:35:28 +03:00
parent 109d684437
commit 21dc46b8da

View File

@ -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);
}
}
}