Create invoice form part 1.

This commit is contained in:
Peter Papp
2021-04-30 17:53:19 +02:00
parent 5167ae520e
commit 3c3e82758d
51 changed files with 1890 additions and 763 deletions

View File

@@ -1,13 +1,10 @@
<?php
namespace App\Services\Oasis;
use Carbon\Carbon;
use App\Services\StripeService;
use App\Models\Oasis\SubscriptionRequest;
use App\Notifications\Oasis\ReminderForPaymentRequiredNotification;
use App\Services\StripeService;
use Carbon\Carbon;
class OasisService
{
@@ -20,21 +17,20 @@ class OasisService
SubscriptionRequest::whereStatus('requested')
->get()
->each(function ($request) {
// Get diffInHours
$diff = Carbon::parse($request->created_at)
->diffInHours(Carbon::now());
// Send order reminder
if ($diff == 8) {
$plan = resolve(StripeService::class)
->getPlan($request->requested_plan);
$request->user->notify(new ReminderForPaymentRequiredNotification(
$request, $plan
$request,
$plan
));
}
});
}
}
}