You are here

function _uc_stripe_validate_key in Ubercart Stripe 6.2

Same name and namespace in other branches
  1. 7.3 uc_stripe.module \_uc_stripe_validate_key()
  2. 7.2 uc_stripe.module \_uc_stripe_validate_key()

Validate Stripe key

Parameters

$key:

Return value

boolean

1 call to _uc_stripe_validate_key()
uc_stripe_settings_form_validate in ./uc_stripe.module
Validation function and normalize keys (trim spaces)

File

./uc_stripe.module, line 261
A stripe.js PCI-compliant payment gateway Forked from Bitcookie's work (thanks!) which was posted at http://bitcookie.com/blog/pci-compliant-ubercart-and-stripe-js from discussion in the uc_stripe issue queue, https://www.drupal.org/node/1467886

Code

function _uc_stripe_validate_key($key) {
  $valid = preg_match('/^[a-zA-Z0-9_]+$/', $key);
  return $valid;
}