Jump to content

Bandwidth Overage Billing


farrelan

Recommended Posts

I have created a server module that I need to use to tie into our systems. In this module I have created the following function to use for testing. When the cron runs it does in fact update just as I expected it to. Now I have changed one of the test orders so that the next invoice was yesterday. I let the cron run and saw that a invoice was created but it didnt bill over any overage.

 

I have looked over all my setting and made sure that it was setup to bill for overages and all seems to be correct. Am I jumping the gun on this? Am I not allowed to force it to run as a test? I hope I dont have to wait till the end of the month just to make sure this is setup correctly.

 

function xdn_UsageUpdate($params) {

$serverid = $params['serverid'];

$serverhostname = $params['serverhostname'];

$serverip = $params['serverip'];

$serverusername = $params['serverusername'];

$serverpassword = $params['serverpassword'];

$serveraccesshash = $params['serveraccesshash'];

$serversecure = $params['serversecure'];

 

// Just update the table with some fake data until I see it bill.

update_query("tblhosting",array(

"bwusage"=>99348,

"bwlimit"=>1000,

"lastupdate"=>"now()",

),array("server"=>$serverid,"mapid"=>"1180"))

 

}

Link to comment
Share on other sites

A cron job is a cron job, if you create a separate job for this single task, there is no harm in that. Though if you are creating invoices each time the thing runs, who's to say that if someone was over today that they won't be tomorrow? Nothing would tick me off more as a client than to have upwards of 30 invoices due at the end of the month :-)

Link to comment
Share on other sites

NO... the last day of this month

 

Can you actually confirm that it runs on the last day of the month, or are you guessing? I'm just curious cause you come across very strongly about this......... My logic would tell me it would be on the first day of the next month, since servers actually still consume bandwidth upto the last minute of the last day, and if his cron runs at say 21:00, then he'll miss out on 3hours worth of bandwidth usage.

Link to comment
Share on other sites

Go to setup->automation settings to look for yourself...to make sure you get the most of the data you would need to run your cron at 1 minuite to midnight.

Overage Billing Charges

Calculate & invoice on the last day of the month independantly from the related product

Calculate on the last day of the month but include on the next invoice to generate for the client

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated