Skip to content

Commit 0070f33

Browse files
committed
"refactoring"
1 parent 282cbe0 commit 0070f33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Authentication/Util/Cache.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public function updateCache($filePath, $merchantConfig)
2828

2929
if (openssl_pkcs12_read($certStore, $certs, $keyPass)) {
3030
$privateKey = $certs['pkey'];
31-
if (!empty($merchantConfig->getKeyAlias())) {
32-
$publicKey = Utility::findCertByAlias($certs, $merchantConfig->getKeyAlias());
33-
} else {
34-
$publicKey = $certs['cert'];
31+
$keyAlias = $merchantConfig->getKeyAlias();
32+
if (empty($keyAlias)) {
33+
$keyAlias = $merchantConfig->getMerchantID();
3534
}
35+
$publicKey = Utility::findCertByAlias($certs, $keyAlias);
3636
$publicKey = $this->PemToDer($publicKey);
3737
}
3838

0 commit comments

Comments
 (0)