Email on successful rebill

Discussion in 'Customization & add-ons' started by celina, Jan 15, 2010.

  1. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    Hey all -
    I really need to receive an email when my customers have successfully been auto-renewed and rebilled;I see that i can let my customers know when that happens, but how can I specify another address or template to send an email to me and my vendor when this occurs? Even being able to just add a cc to the email that the customer receives on successful rebill would be helpful here.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Edit /amember/common.inc.php and find this:
    Code:
    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);
    }
    
    and change this function:
    Code:
    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);
        mail_template_admin($t, $et);
    }
    

Share This Page