$arb ? 'ARB ' : '', '@order_id' => $_POST['x_invoice_num'], '@post' => print_r($_POST, true), ); watchdog('uc_authorizenet', '!arbSilent POST received for order @order_id:
@post', $args); } // Decrypt the Auth.Net API login data. $login_data = _uc_authorizenet_login_data(); // TODO: Modify the MD5 hash to accommodate differences from AIM to ARB. // This is an ARB notification. if ($arb) { // Compare our expected MD5 Hash against what was received. $md5 = strtoupper(md5($login_data['md5_hash'] . $_POST['x_trans_id'] . $_POST['x_amount'])); // Post an error message if the MD5 hash does not validate. if ($_POST['x_MD5_Hash'] != $md5) { watchdog('uc_authorizenet', 'Invalid ARB payment notification received.', array(), WATCHDOG_ERROR); } // Otherwise, let other modules act on the data. else { /** * @deprecated: uc_recurring is now a contrib module: * http://www.drupal.org/project/uc_recurring * * The function uc_recurring_fee_save() only exists in uc_recurring-1.x * and the code below should be removed when that version of the module * becomes unsupported. * * uc_recurring-2.x takes advantage of the hook_uc_auth_arb_payment() */ // **** start @deprecated code ****** if (function_exists('uc_recurring_fee_save')) { // Otherwise, update the recurring fee information in our database. $fee = db_fetch_array(db_query("SELECT * FROM {uc_recurring_users} WHERE fee_handler = 'uc_authorizenet' AND data = '%s'", $_POST['x_subscription_id'])); // Only process if the fee actually exists! if (!empty($fee)) { // Update the interval counters. $fee['remaining_intervals'] -= 1; $fee['charged_intervals'] += 1; // Set the next expected charge time. $fee['next_charge'] = strtotime('+'. $fee['regular_interval'], $fee['next_charge']); // Save the new values. uc_recurring_fee_save('user', $fee); // Log the ARB payment if enabled. if (variable_get('uc_authnet_report_arb_post', FALSE)) { watchdog('uc_authorizenet', 'ARB payment reported for order @order_id:
@post', array('@order_id' => $fee['order_id'], '@post' => print_r($_POST, TRUE))); } // Let other modules act on the data. module_invoke_all('uc_arb_payment', $_POST); } } // **** \end @deprecated code ****** else { module_invoke_all('uc_auth_arb_payment', $_POST); } } } exit(); } // Displays a form for customers to update their CC info. function uc_authorizenet_arb_user_update_form($form_state, $user, $rfid) { $form = array(); $fee = uc_recurring_fee_load('user', $rfid); $form['uid'] = array( '#type' => 'value', '#value' => $user->uid, ); $form['rfid'] = array( '#type' => 'value', '#value' => $rfid, ); $form['description'] = array( '#value' => '