microguy Posted May 22, 2008 Share Posted May 22, 2008 This is my first attempt at modifying code, and I need a little help. Our billing system currently send notices to subscribers upon each successful rebill. We want to turn this feature off. I have found the function in the code that performs this action. There are two files involved. One that processes the credit card and calls the function and the other that contains the sub routine. cc_core.inc.php case CC_RESULT_SUCCESS: $err = $db->finish_waiting_payment( $payment['payment_id'], $payment['paysys_id'], $receipt_id, $payment['amount'], '', cc_core_get_payer_id($vars, $member)); if ($err) { $db->log_error($err . ": payment_id = $payment[payment_id] (rebilling)"); } mail_rebill_success_member($member, $payment_id, $product); break; case CC_RESULT_INTERNAL_ERROR: case CC_RESULT_DECLIME_TEMP: if ($pl->config['reattempt'] != '') $new_expire = cc_core_prorate_subscription($p['payment_id'], $pl->config['reattempt'], $dat); mail_rebill_failed_member($member, $payment_id, $product, "$err_msg", $new_expire); break; common.inc.php function mail_rebill_success_member($user, $payment_id, $product){ global $db; $t = &new_smarty(); $t->assign('user', $user); $t->assign('payment', $db->get_payment($payment_id)); $t->assign('product', $product->config); /// $et = & new aMemberEmailTemplate(); $et->name = "cc_rebill_success"; mail_template_user($t, $et, $user); } I don't want to send customer email after rebill so how do I null mail_rebill_success_member? Link to comment https://forums.phpfreaks.com/topic/106767-solved-making-a-function-null/ Share on other sites More sharing options...
jonsjava Posted May 22, 2008 Share Posted May 22, 2008 just remove mail_rebill_success_member($member, $payment_id, $product); Link to comment https://forums.phpfreaks.com/topic/106767-solved-making-a-function-null/#findComment-547303 Share on other sites More sharing options...
microguy Posted May 22, 2008 Author Share Posted May 22, 2008 ///////////////////////////////////////////////////////////////////////// // This function was removed to stop email notifications ///////////////////////////////////////////////////////////////////////// // mail_rebill_success_member($member, $payment_id, $product); break; Would that be considered bad style...or should I use somthing like: /* This function was removed to stop email notifications mail_rebill_success_member($member, $payment_id, $product); */ break; Link to comment https://forums.phpfreaks.com/topic/106767-solved-making-a-function-null/#findComment-547309 Share on other sites More sharing options...
microguy Posted May 22, 2008 Author Share Posted May 22, 2008 { case CC_RESULT_SUCCESS: $err = $db->finish_waiting_payment( $payment['payment_id'], $payment['paysys_id'], $receipt_id, $payment['amount'], '', cc_core_get_payer_id($vars, $member)); if ($err) { $db->log_error($err . ": payment_id = $payment[payment_id] (rebilling)"); } // Turned off Rebill Emails // mail_rebill_success_member($member, $payment_id, $product); break; case CC_RESULT_INTERNAL_ERROR: case CC_RESULT_DECLIME_TEMP: if ($pl->config['reattempt'] != '') $new_expire = cc_core_prorate_subscription($p['payment_id'], $pl->config['reattempt'], $dat); // Turned off Failed Emails // mail_rebill_failed_member($member, $payment_id, $product, "$err_msg", $new_expire); break; case CC_RESULT_DECLINE_PERM: if ($pl->config['reattempt'] != '') $new_expire = cc_core_prorate_subscription($p['payment_id'], $pl->config['reattempt'], $dat); // Turned off Failed Emails // mail_rebill_failed_member($member, $payment_id, $product, "$err_msg", $new_expire); // clean_cc_info($member); break; case CC_RESULT_IGNORE: break; default: $db->log_error("Unknown return from plugin_bill: $res"); }; Does this look correct? Link to comment https://forums.phpfreaks.com/topic/106767-solved-making-a-function-null/#findComment-547315 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.