function _uc_authorizenet_login_data in Ubercart 7.3
Same name and namespace in other branches
- 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_login_data()
- 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_login_data()
Decrypts the login data for using Auth.Net APIs.
2 calls to _uc_authorizenet_login_data()
- uc_authorizenet_settings_form in payment/
uc_authorizenet/ uc_authorizenet.module - Callback for payment gateway settings.
- uc_authorizenet_silent_post in payment/
uc_authorizenet/ uc_authorizenet.pages.inc - Receives a payment notification and handles it appropriately.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 961 - Processes payments using Authorize.net. Supports AIM and ARB.
Code
function _uc_authorizenet_login_data() {
static $data;
if (!empty($data)) {
return $data;
}
$md5_hash = variable_get('uc_authnet_md5_hash', '');
// If CC encryption has been configured properly.
if ($key = uc_credit_encryption_key()) {
// Setup our encryption object.
$crypt = new UbercartEncryption();
// Decrypt the MD5 Hash.
if (!empty($md5_hash)) {
$md5_hash = $crypt
->decrypt($key, $md5_hash);
}
// Store any errors.
uc_store_encryption_errors($crypt, 'uc_authorizenet');
}
$data = array(
'md5_hash' => $md5_hash,
);
return $data;
}