cc_core.inc.php - keep some cc info even if member cancels recurring billing

Discussion in 'Customization & add-ons' started by bpbp, Jan 25, 2008.

  1. bpbp

    bpbp Member

    Joined:
    Aug 22, 2006
    Messages:
    31
    Hi Alex,

    I use payflow_pro plugin and would like to keep some billing info even if member cancels recurring billing.

    So we have this function in cc_core.inc.php:
    PHP:
    function clean_cc_info($member){
        global 
    $db;
        
    $cc_fields = array(
            
    '''-expire''-hidden',
            
    '_code''_type',
            
    '_name_f''_name_l''_name',
            
    '_phone''_company''_housenumber',
            
    '_street''_city''_state''_zip','_country',
            
    '_issuenum''_startdate''_province');
        
    $m $db->get_user($member['member_id']);
        foreach (
    $cc_fields as $f)
            
    $m['data']['cc'.$f] = '';
        
    $db->update_user($m['member_id'], $m);
    }
    My mods:
    PHP:
    function clean_cc_info($member){
        global 
    $db;
        
    $cc_fields = array(
            
    '''-expire''-hidden',
            
    '_code''_type',
            
    '_name_f''_name_l''_name',
            
    '_phone''_company''_housenumber',
            
    '_street''_city''_state''_zip','_country',
            
    '_issuenum''_startdate''_province');
        
    $m $db->get_user($member['member_id']);
            
    $m['data']['cc-expire'] = '';
            
    $m['data']['cc-hidden'] = '';
            
    $m['data']['cc_code'] = '';
        
    $db->update_user($m['member_id'], $m);
    }
    The billing fields I'd like to keep are:
    -Address
    -City
    -State
    -ZIP
    -Country
    -First name
    -Last Name
    -CC // (**** **** **** 0000)

    Are my mods ok? Just want to double-check with the expert :)
  2. scott_sm

    scott_sm New Member

    Joined:
    Aug 22, 2006
    Messages:
    26
    Does this work?

    Hi bpbp,

    I'm curious - Have you had success with this mod, with no interruption in recurring billing?

    I use LinkPoint, so I'm wondering if something like this may work for me too (of course, I'd ask Support before I go ahead with it). Just wondering how you're making out with this mod.

    Thanks!

Share This Page