public static function StripeGateway::validateKey in Ubercart Stripe 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Ubercart/PaymentMethod/StripeGateway.php \Drupal\uc_stripe\Plugin\Ubercart\PaymentMethod\StripeGateway::validateKey()
Validate Stripe key
Parameters
$key:
Return value
boolean
1 call to StripeGateway::validateKey()
- StripeGateway::validateConfigurationForm in src/
Plugin/ Ubercart/ PaymentMethod/ StripeGateway.php - Form validation handler.
File
- src/
Plugin/ Ubercart/ PaymentMethod/ StripeGateway.php, line 107
Class
- StripeGateway
- Stripe Ubercart gateway payment method.
Namespace
Drupal\uc_stripe\Plugin\Ubercart\PaymentMethodCode
public static function validateKey($key) {
$valid = preg_match('/^[a-zA-Z0-9_]+$/', $key);
return $valid;
}