You are here

private static function Braintree_Subscription::_validateId in Commerce Braintree 7

@ignore

1 call to Braintree_Subscription::_validateId()
Braintree_Subscription::find in braintree_php/lib/Braintree/Subscription.php

File

braintree_php/lib/Braintree/Subscription.php, line 211

Class

Braintree_Subscription
Braintree Subscription module

Code

private static function _validateId($id = null) {
  if (empty($id)) {
    throw new InvalidArgumentException('expected subscription id to be set');
  }
  if (!preg_match('/^[0-9A-Za-z_-]+$/', $id)) {
    throw new InvalidArgumentException($id . ' is an invalid subscription id.');
  }
}