/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     //Update the payments status from pending to due
     $this->subscriptionChargeService->makeChargesDue();
     //Bill the due charges
     $this->subscriptionChargeService->billMembers();
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     //Update the payments status from pending to due
     $this->info('Moving sub charges to due');
     $this->subscriptionChargeService->makeChargesDue();
     //Bill the due charges
     $this->info('Billing members');
     $this->subscriptionChargeService->billMembers();
     $this->info('Finished');
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $dayOffset = $this->argument('dayOffset');
     $targetDate = Carbon::now()->addDays($dayOffset);
     $this->info("Generating charges for " . $targetDate);
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate);
     //in case yesterdays process failed we will rerun the past seven days, this should pickup and stragglers
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-1 day
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-2 days
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-3 days
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-4 days
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-5 days
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-6 days
     $this->subscriptionChargeService->createSubscriptionCharges($targetDate->subDay());
     //-7 days
 }