File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1413,22 +1413,22 @@ public function validateMerchantData()
14131413 }
14141414
14151415 private function validateMLEConfiguration (){
1416- // $mleConfigured = $this->enableRequestMLEForOptionalApisGlobally;
1417- // if ($this->mapToControlMLEonAPI !== null && !empty($this->mapToControlMLEonAPI)) {
1418- // foreach ($this->mapToControlMLEonAPI as $value) {
1419- // if ($value) {
1420- // $mleConfigured = true;
1421- // break;
1422- // }
1423- // }
1424- // }
1416+ $ requestMleConfigured = $ this ->enableRequestMLEForOptionalApisGlobally ;
1417+ if ($ this ->mapToControlMLEonAPI !== null && !empty ($ this ->mapToControlMLEonAPI )) {
1418+ foreach ($ this ->mapToControlMLEonAPI as $ value ) {
1419+ if ($ value ) {
1420+ $ requestMleConfigured = true ;
1421+ break ;
1422+ }
1423+ }
1424+ }
14251425 // if MLE=true then check for auth Type
1426- // if ($mleConfigured && strcasecmp($this->authenticationType, GlobalParameter::JWT) !== 0) {
1427- // $error_message = GlobalParameter::MLE_AUTH_ERROR ;
1428- // $exception = new AuthException($error_message, 0);
1429- // self::$logger->error($error_message);
1430- // throw $exception;
1431- // }
1426+ if ($ requestMleConfigured && strcasecmp ($ this ->authenticationType , GlobalParameter::JWT ) !== 0 ) {
1427+ $ error_message = GlobalParameter::REQUEST_MLE_AUTH_ERROR ;
1428+ $ exception = new AuthException ($ error_message , 0 );
1429+ self ::$ logger ->error ($ error_message );
1430+ throw $ exception ;
1431+ }
14321432
14331433 if (isset ($ this ->mleForRequestPublicCertPath )) {
14341434 $ certPath = $ this ->mleForRequestPublicCertPath ;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class GlobalParameter
107107 const KEYFILEFIELDDIR = "keysDirectory " ;
108108 const DEFAULT_MLE_ALIAS_FOR_CERT = "CyberSource_SJC_US " ;
109109 const CERTIFICATE_EXPIRY_DATE_WARNING_DAYS = 90 ;
110- const MLE_AUTH_ERROR = "MLE is only supported in JWT auth type " ;
110+ const REQUEST_MLE_AUTH_ERROR = "Request MLE is only supported in JWT auth type " ;
111111 const EMPTY_PRIVATE_OR_PUBLIC_KEY_ERROR = "Private key or public key is empty " ;
112112}
113113?>
You can’t perform that action at this time.
0 commit comments