TSQL auto renewal subscription handling
Posted on 2014-12-30
i have a problem how i can handle the subscription first i have 3 kinds of updateType , if the updateType = 1 mean its New Subscription , if updatetype equal to 2 mean Unsubcription and updatetype = 3 for modification and on the latest one i has a 1 fields with rentSucess : false mean the operator not able to charge the user and if its true mean the operator able to charge the user .
the problem that the operator will not send me everytime when he try to charge the users i should automaticly renew the susbcription ( subscription type its daily )
he only send me updatetype = 3 when he fails on charging and once he sucess he will send me updatetpye =3 with rentsucess = true in this case i will automatily extend his subcription for 1 days more , whene the update type = 3 with rentsucess = false the auto-renewal will be on HOLD once i get new modification with sucess rent the auto renewal work again ..
if i run a agent job how i can handle the modifcation and also the auto daily renewal .