public static function isCustomerIdValid($postedParam)
	{
		$isCustomerIdEmpty = true;
		$isValidCustomerId = false;

		if(isset($postedParam['customerId'])) {
			$isCustomerIdEmpty = CheckoutApi_Lib_Validator::isEmpty($postedParam['customerId']);
        }

        if(!$isCustomerIdEmpty) {

			$isValidCustomerId = CheckoutApi_Lib_Validator::isString($postedParam['customerId']);
		}

		return !$isCustomerIdEmpty && $isValidCustomerId;
	}
public static function isCustomerIdValid($postedParam)
	{
		$isCustomerIdEmpty = true;
		$isValidCustomerId = false;

		if(isset($postedParam['customerId'])) {
			$isCustomerIdEmpty = CheckoutApi_Lib_Validator::isEmpty($postedParam['customerId']);
        }

        if(!$isCustomerIdEmpty) {

			$isValidCustomerId = CheckoutApi_Lib_Validator::isString($postedParam['customerId']);
		}

		return !$isCustomerIdEmpty && $isValidCustomerId;
	}
public static function isCustomerIdValid ( $ postedParam ) { $ isCustomerIdEmpty = true ; $ isValidCustomerId = false ; if ( isset ( $ postedParam [ 'customerId' ] ) ) { $ isCustomerIdEmpty = CheckoutApi_Lib_Validator :: isEmpty ( $ postedParam [ 'customerId' ] ) ; } if ( ! $ isCustomerIdEmpty ) { $ isValidCustomerId = CheckoutApi_Lib_Validator :: isString ( $ postedParam [ 'customerId' ] ) ; } return ! $ isCustomerIdEmpty && $ isValidCustomerId ; }
A helper method that is use to check if payload has set a customer id.
@param array $postedParam
@return boolean
check if customer id is valid.
Simple usage:
CheckoutApi_Client_Validation_GW3::CustomerIdValid($postedParam);
A helper method that is use to check if payload has set a customer id .