Changeset 620

Show
Ignore:
Timestamp:
03/16/08 14:21:28 (10 months ago)
Author:
areski
Message:

fix to jump to voucher if the card auto-created has no credit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/common/lib/Class.A2Billing.php

    r617 r620  
    19461946                                 
    19471947                                if (strlen($prompt)>0){ 
     1948                                        $agi-> stream_file($prompt, '#'); // Added because was missing the prompt  
     1949                                        $this -> debug( WRITELOG, $agi, __FILE__, __LINE__, 'prompt:'.strtoupper($prompt)); 
     1950                                         
    19481951                                        $this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[ERROR CHECK CARD : $prompt (cardnumber:".$this->cardnumber.")]"); 
    1949                                         $res = -2; 
    1950                                         break; 
     1952                                         
     1953                                        if ($this->agiconfig['jump_voucher_if_min_credit']==1 && $prompt == "prepaid-zero-balance"){ 
     1954                                         
     1955                                                $this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[NOTENOUGHCREDIT - refill_card_withvoucher] "); 
     1956                                                $vou_res = $this -> refill_card_with_voucher($agi,2); 
     1957                                                if ($vou_res==1){ 
     1958                                                        return 0; 
     1959                                                }else { 
     1960                                                        $this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[NOTENOUGHCREDIT - refill_card_withvoucher fail] "); 
     1961                                                } 
     1962                                        } 
     1963                                        if ($prompt == "prepaid-zero-balance" && $this->agiconfig['notenoughcredit_cardnumber']==1) {  
     1964                                                $this->accountcode=''; 
     1965                                                $this->agiconfig['cid_auto_assign_card_to_cid']=0; 
     1966                                                if ($this->agiconfig['notenoughcredit_assign_newcardnumber_cid']==1) $this -> ask_other_cardnumber=1; 
     1967                                        }else{ 
     1968                                                return -2; 
     1969                                        } 
    19511970                                } 
    19521971                                 


Google