public function getPlaidEnvironment() { if (!$this->getPlaidClientId()) { return null; } $stripe_key = $this->getPublishableStripeKey(); return substr(trim($stripe_key), 0, 8) == 'pk_test_' ? 'tartan' : 'production'; }