diff --git a/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php b/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php index ca9486514c62..980ad8003005 100644 --- a/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php @@ -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); + } + } + }