sql server and asp.net and automated payments

  • Thread starter Thread starter khawar
  • Start date Start date
K

khawar

hi,, everybody
i have an asp.net application, where members (clients)
have their information stored in sql server Database. Now
I want to implement a thing where afterevery 30days a
member would get charged $x dollars. The payment
processing method i use is payflow pro. Can anyone help
me with how to accomplish it. I am thinking maybe
thereare triggers in database that would call up a asp.net
page that in turn will contact database to check to see
who should be charged and then start charging them. if
you know any other way which is more efficient please
advice. can some one help
thanks
bye
 
Doing it via triggers would be a bad idea.

Your best bet would be to add a field into the client table that contains
the date when the person was last charged.

Then, run a daily process (it can be a standalone EXE, or whatever, and it
can be executed by the Windows scheduler, for example). This process would
select from the database all records where the last charged date is older
than 30 days, and then it would charge them.

This way if something goes wrong, and the process doesn't run correctly for
a day or two, the next time it runs it would "catch up" to everyone.

When the process runs, it should, of course, update the "last charge date"
to "now" as soon as it bills a client.
 
Back
Top