public static function isValidCurrency($postedParam) 
	{
		$isValid = false;

		if(isset($postedParam['currency'])) {

			$currency = $postedParam['currency'];
			$currencyEmpty = CheckoutApi_Lib_Validator::isEmpty($currency);

			if(!$currencyEmpty){
				$isCurrencyLen = CheckoutApi_Lib_Validator::isLength($currency, 3);

				if($isCurrencyLen) {
					$isValid = true;
				}
			}
		}

		return $isValid;
	}
public static function isValidCurrency($postedParam) 
	{
		$isValid = false;

		if(isset($postedParam['currency'])) {

			$currency = $postedParam['currency'];
			$currencyEmpty = CheckoutApi_Lib_Validator::isEmpty($currency);

			if(!$currencyEmpty){
				$isCurrencyLen = CheckoutApi_Lib_Validator::isLength($currency, 3);

				if($isCurrencyLen) {
					$isValid = true;
				}
			}
		}

		return $isValid;
	}
public static function isValidCurrency ( $ postedParam ) { $ isValid = false ; if ( isset ( $ postedParam [ 'currency' ] ) ) { $ currency = $ postedParam [ 'currency' ] ; $ currencyEmpty = CheckoutApi_Lib_Validator :: isEmpty ( $ currency ) ; if ( ! $ currencyEmpty ) { $ isCurrencyLen = CheckoutApi_Lib_Validator :: isLength ( $ currency , 3 ) ; if ( $ isCurrencyLen ) { $ isValid = true ; } } } return $ isValid ; }
A helper method that is use check if payload has a currency set and if length of currency value is 3
@param array $postedParam
@return boolean
Simple usage:
CheckoutApi_Client_Validation_GW3::isValidCurrency($postedParam);
A helper method that is use check if payload has a currency set and if length of currency value is 3