Hi guys,
I've noticed it is not fair to decide when user want to change his card number to a new one. lets say he calls a destination at 0.80 cents per minute and we cut him below 1 dollar
or we cut him at 50 cents but he can use this 50 cents to call a destination at 2 cents per minute for 25 minutes but this 50 cents is not even enough to call 80 cents destination.
so I've added a little bit of code to Class.A2Billing.php to make sure user only be able to change his pin number when he fail to call a destination due to insufficient fund.
line 781
Code:
if (!($minutes>0)){
$prompt="prepaid-no-enough-credit";
$agi-> stream_file($prompt, '#');
//hack to enable add new card number:
$this->agiconfig['cid_enable']=0;
$this->agiconfig['use_dnid']=0;
$this->agiconfig['cid_auto_assign_card_to_cid']=0;
$this->accountcode='';
$this->username='';
$this-> ask_other_cardnumber = 1;
$cia_res = $this -> callingcard_ivr_authenticate($agi);
$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[NOTENOUGHCREDIT_CARDNUMBER - TRY : callingcard_ivr_authenticate]");
if ($cia_res!=0) break;
return -1;
}