Open tmhevencent opened 1 year ago
Do you have a clear way of how SecurityCredential is generated? I have tried but keeps failing.
$certFile = 'mpesa_public_cert.cer'; $certContent = file_get_contents($certFile); $publicKey = openssl_pkey_get_public($certContent); $encrypted = ''; openssl_public_encrypt($plaintext, $encrypted, $publicKey, OPENSSL_PKCS1_PADDING); return base64_encode($encrypted);
Do you have a clear way of how SecurityCredential is generated? I have tried but keeps failing.
$certFile = 'mpesa_public_cert.cer'; $certContent = file_get_contents($certFile); $publicKey = openssl_pkey_get_public($certContent); $encrypted = ''; openssl_public_encrypt($plaintext, $encrypted, $publicKey, OPENSSL_PKCS1_PADDING); return base64_encode($encrypted);