Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 10:17 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Assign a new card after the card expired
PostPosted: Fri Aug 22, 2008 9:46 pm 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Hi,

Expiration days/date in A2billing feature's kind of in the middle of something. When cards expired, It should do something more than just announce "Sorry, you card has expired". I think it should do like:
1. check if the card expire then announce "Sorry, your card has expired"
2. reset the balance/credit to zero (Optional but it good idea because I can search for these cards easier and use batch up to delete the cards)
3. remove callerID from CallerID table. (Optional, not necessary if assign a new card work)
4. ask caller for new card.

Anybody has some code or other idea to handle this?

I know this could be very easy to write some script to handle this but I have no idea how to do it. (Stavros hint it could be done thru cronjob, or in a2billing.php or even class.a2billing.php but I don't know how)

Thank in advance,
Sukasem


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2008 12:32 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Here what I get it to work:

open Class.A2billing.php

Find this following code:
Quote:
if ($prompt == "prepaid-zero-balance" && $this->agiconfig['notenoughcredit_cardnumber']==1) {
$this->accountcode=''; $callerID_enable=0;
$this->agiconfig['cid_auto_assign_card_to_cid']=0;
if ($this->agiconfig['notenoughcredit_assign_newcardnumber_cid']==1) $this -> ask_other_cardnumber=1;
}else{
return -2;
}


Then insert the follwing code before }else{
Quote:
}elseif ($prompt == "prepaid-card-expired") {
$this->accountcode=''; $callerID_enable=0;
$this->agiconfig['cid_auto_assign_card_to_cid']=0;
$this -> ask_other_cardnumber=1;


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group