protected function getCustomerId($payment) {
		if (!is_string($payment) and $payment instanceof Payment) {
			$payment = $payment->customerId;
		}
		if (is_array($payment) and isset($payment["customerId"])) {
			$payment = $payment["customerId"];
		}
		if (!is_string($payment)) {
			throw new Exception("Given Customer ID is not valid.");
		}
		return $payment;
	}
protected function getCustomerId($payment) {
		if (!is_string($payment) and $payment instanceof Payment) {
			$payment = $payment->customerId;
		}
		if (is_array($payment) and isset($payment["customerId"])) {
			$payment = $payment["customerId"];
		}
		if (!is_string($payment)) {
			throw new Exception("Given Customer ID is not valid.");
		}
		return $payment;
	}
protected function getCustomerId ( $ payment ) { if ( ! is_string ( $ payment ) and $ payment instanceof Payment ) { $ payment = $ payment -> customerId ; } if ( is_array ( $ payment ) and isset ( $ payment [ "customerId" ] ) ) { $ payment = $ payment [ "customerId" ] ; } if ( ! is_string ( $ payment ) ) { throw new Exception ( "Given Customer ID is not valid." ) ; } return $ payment ; }
Get customerId as string and validate it.
@ignore
@param Payment|string|array $payment String, Payment object or array as returned from paymentInit call
@return string
@throws Exception
Get customerId as string and validate it .