You are here

private function SimpleCheckoutForm::checkTestStripeApiKey in Stripe 8

Helper function for making sure stripe key is set for test and has the necessary keys.

2 calls to SimpleCheckoutForm::checkTestStripeApiKey()
SimpleCheckoutForm::buildForm in modules/stripe_examples/src/Form/SimpleCheckoutForm.php
Form constructor.
SimpleCheckoutForm::submitForm in modules/stripe_examples/src/Form/SimpleCheckoutForm.php
Form submission handler.

File

modules/stripe_examples/src/Form/SimpleCheckoutForm.php, line 93

Class

SimpleCheckoutForm
Class SimpleCheckout.

Namespace

Drupal\stripe_examples\Form

Code

private function checkTestStripeApiKey() {
  $status = FALSE;
  $config = \Drupal::config('stripe.settings');
  if ($config
    ->get('environment') == 'test' && $config
    ->get('apikey.test.secret')) {
    $status = TRUE;
  }
  return $status;
}