mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 00:53:10 +01:00
commit
bf6e1ea5a9
@ -1 +1 @@
|
|||||||
5.1.37
|
5.1.38
|
@ -12,13 +12,15 @@
|
|||||||
namespace App\Jobs\Cron;
|
namespace App\Jobs\Cron;
|
||||||
|
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Utils\Traits\SubscriptionHooker;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class SubscriptionCron
|
class SubscriptionCron
|
||||||
{
|
{
|
||||||
use Dispatchable;
|
use Dispatchable;
|
||||||
|
use SubscriptionHooker;
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
@ -37,37 +39,55 @@ class SubscriptionCron
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (! config('ninja.db.multi_db_enabled')) {
|
if (! config('ninja.db.multi_db_enabled')) {
|
||||||
|
|
||||||
$this->loopSubscriptions();
|
$this->loopSubscriptions();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//multiDB environment, need to
|
//multiDB environment, need to
|
||||||
foreach (MultiDB::$dbs as $db) {
|
foreach (MultiDB::$dbs as $db) {
|
||||||
|
|
||||||
MultiDB::setDB($db);
|
MultiDB::setDB($db);
|
||||||
|
|
||||||
$this->loopSubscriptions();
|
$this->loopSubscriptions();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function loopSubscriptions()
|
private function loopSubscriptions()
|
||||||
{
|
{
|
||||||
//looop recurring invoices with subscription id
|
|
||||||
|
|
||||||
// $client_subs = ClientSubscription::whereNull('deleted_at')
|
$invoices = Invoice::where('is_deleted', 0)
|
||||||
// ->cursor()
|
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
||||||
// ->each(function ($cs){
|
->where('balance', '>', 0)
|
||||||
// $this->processSubscription($cs);
|
->whereDate('due_date', '<=', now()->addDay()->startOfDay())
|
||||||
// });
|
->whereNotNull('subscription_id')
|
||||||
|
->cursor();
|
||||||
|
|
||||||
|
|
||||||
|
$invoices->each(function ($invoice){
|
||||||
|
|
||||||
|
$subscription = $invoice->subscription;
|
||||||
|
|
||||||
|
$body = [
|
||||||
|
'context' => 'plan_expired',
|
||||||
|
'client' => $invoice->client->hashed_id,
|
||||||
|
'invoice' => $invoice->hashed_id,
|
||||||
|
'subscription' => $subscription->hashed_id,
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->sendLoad($subscription, $body);
|
||||||
|
//This will send the notification daily.
|
||||||
|
//We'll need to handle this by performing some action on the invoice to either archive it or delete it?
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Our daily cron should check
|
|
||||||
|
|
||||||
1. Is the subscription still in trial phase?
|
private function handleWebhook($invoice, $subscription)
|
||||||
2. Check the recurring invoice and its remaining_cycles to see whether we need to cancel or perform any other function.
|
|
||||||
3. Any notifications that need to fire?
|
|
||||||
*/
|
|
||||||
private function processSubscription($client_subscription)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ class SchedulerCheck implements ShouldQueue
|
|||||||
try {
|
try {
|
||||||
Artisan::call('optimize');
|
Artisan::call('optimize');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
nlog($e->getMessage());
|
||||||
nlog("I wasn't able to optimize.");
|
nlog("I wasn't able to optimize.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,15 +243,11 @@ class Account extends BaseModel
|
|||||||
if ($trial_plan && $include_trial) {
|
if ($trial_plan && $include_trial) {
|
||||||
$trial_started = $this->trial_started;
|
$trial_started = $this->trial_started;
|
||||||
$trial_expires = $this->trial_started->addSeconds($this->trial_duration);
|
$trial_expires = $this->trial_started->addSeconds($this->trial_duration);
|
||||||
// $trial_expires->modify('+2 weeks');
|
|
||||||
|
|
||||||
if($trial_expires->greaterThan(now())){
|
if($trial_expires->greaterThan(now())){
|
||||||
$trial_active = true;
|
$trial_active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ($trial_expires >= date_create()) {
|
|
||||||
// $trial_active = true;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$plan_active = false;
|
$plan_active = false;
|
||||||
|
@ -166,6 +166,11 @@ class Invoice extends BaseModel
|
|||||||
return $this->belongsTo(User::class)->withTrashed();
|
return $this->belongsTo(User::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function recurring_invoice()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(RecurringInvoice::class)->withTrashed();
|
||||||
|
}
|
||||||
|
|
||||||
public function assigned_user()
|
public function assigned_user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
|
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
|
||||||
@ -181,6 +186,11 @@ class Invoice extends BaseModel
|
|||||||
return $this->belongsTo(Client::class)->withTrashed();
|
return $this->belongsTo(Client::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function subscription()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Subscription::class)->withTrashed();
|
||||||
|
}
|
||||||
|
|
||||||
public function documents()
|
public function documents()
|
||||||
{
|
{
|
||||||
return $this->morphMany(Document::class, 'documentable');
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
|
@ -18,11 +18,14 @@ class MailServiceProvider extends MailProvider
|
|||||||
|
|
||||||
protected function registerIlluminateMailer()
|
protected function registerIlluminateMailer()
|
||||||
{
|
{
|
||||||
$this->app->singleton('mail.manager', function($app) {
|
// $this->app->singleton('mail.manager', function($app) {
|
||||||
|
// return new GmailTransportManager($app);
|
||||||
|
// });
|
||||||
|
|
||||||
|
$this->app->bind('mail.manager', function($app) {
|
||||||
return new GmailTransportManager($app);
|
return new GmailTransportManager($app);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$this->app->bind('mailer', function ($app) {
|
$this->app->bind('mailer', function ($app) {
|
||||||
return $app->make('mail.manager')->mailer();
|
return $app->make('mail.manager')->mailer();
|
||||||
});
|
});
|
||||||
|
@ -32,12 +32,14 @@ use App\Repositories\SubscriptionRepository;
|
|||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Traits\CleanLineItems;
|
use App\Utils\Traits\CleanLineItems;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SubscriptionHooker;
|
||||||
use GuzzleHttp\RequestOptions;
|
use GuzzleHttp\RequestOptions;
|
||||||
|
|
||||||
class SubscriptionService
|
class SubscriptionService
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
use CleanLineItems;
|
use CleanLineItems;
|
||||||
|
use SubscriptionHooker;
|
||||||
|
|
||||||
/** @var subscription */
|
/** @var subscription */
|
||||||
private $subscription;
|
private $subscription;
|
||||||
@ -82,7 +84,9 @@ class SubscriptionService
|
|||||||
'subscription' => $this->subscription->hashed_id,
|
'subscription' => $this->subscription->hashed_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->triggerWebhook($context);
|
$response = $this->triggerWebhook($context);
|
||||||
|
|
||||||
|
nlog($response);
|
||||||
|
|
||||||
if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1)
|
if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1)
|
||||||
return redirect($this->subscription->webhook_configuration['post_purchase_url']);
|
return redirect($this->subscription->webhook_configuration['post_purchase_url']);
|
||||||
@ -124,6 +128,7 @@ class SubscriptionService
|
|||||||
|
|
||||||
$response = $this->triggerWebhook($context);
|
$response = $this->triggerWebhook($context);
|
||||||
|
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Starts the process to create a trial
|
/* Starts the process to create a trial
|
||||||
@ -229,29 +234,15 @@ class SubscriptionService
|
|||||||
'db' => $this->subscription->company->db,
|
'db' => $this->subscription->company->db,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$headers = [
|
$response = $this->sendLoad($this->subscription, $body);
|
||||||
'Content-Type' => 'application/json',
|
|
||||||
'X-Requested-With' => 'XMLHttpRequest',
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
$client = new \GuzzleHttp\Client(
|
|
||||||
[
|
|
||||||
'headers' => $headers,
|
|
||||||
]);
|
|
||||||
|
|
||||||
try {
|
|
||||||
$response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription->webhook_configuration['post_purchase_url'],[
|
|
||||||
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
catch(\Exception $e)
|
|
||||||
{
|
|
||||||
$body = array_merge($body, ['exception' => $e->getMessage()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Append the response to the system logger body */
|
/* Append the response to the system logger body */
|
||||||
if($response) {
|
if(is_array($response)){
|
||||||
|
|
||||||
|
$body = $response;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
$status = $response->getStatusCode();
|
$status = $response->getStatusCode();
|
||||||
$response_body = $response->getBody();
|
$response_body = $response->getBody();
|
||||||
|
@ -136,4 +136,37 @@ class Ninja
|
|||||||
|
|
||||||
return $translations;
|
return $translations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createLicense($request)
|
||||||
|
{
|
||||||
|
// $affiliate = Affiliate::where('affiliate_key', '=', SELF_HOST_AFFILIATE_KEY)->first();
|
||||||
|
// $email = trim(Input::get('email'));
|
||||||
|
|
||||||
|
// if (! $email || $email == TEST_USERNAME) {
|
||||||
|
// return RESULT_FAILURE;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $license = new License();
|
||||||
|
// $license->first_name = Input::get('first_name');
|
||||||
|
// $license->last_name = Input::get('last_name');
|
||||||
|
// $license->email = $email;
|
||||||
|
// $license->transaction_reference = Request::getClientIp();
|
||||||
|
// $license->license_key = self::generateLicense();
|
||||||
|
// $license->affiliate_id = $affiliate->id;
|
||||||
|
// $license->product_id = PRODUCT_SELF_HOST;
|
||||||
|
// $license->is_claimed = 1;
|
||||||
|
// $license->save();
|
||||||
|
|
||||||
|
// return RESULT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// public static function generateLicense()
|
||||||
|
// {
|
||||||
|
// $parts = [];
|
||||||
|
// for ($i = 0; $i < 5; $i++) {
|
||||||
|
// $parts[] = strtoupper(str_random(4));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return implode('-', $parts);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ use App\Utils\SystemHealth;
|
|||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
trait AppSetup
|
trait AppSetup
|
||||||
{
|
{
|
||||||
@ -36,6 +37,9 @@ trait AppSetup
|
|||||||
{
|
{
|
||||||
$cached_tables = config('ninja.cached_tables');
|
$cached_tables = config('ninja.cached_tables');
|
||||||
|
|
||||||
|
if(request()->has('clear_cache'))
|
||||||
|
Artisan::call('optimize');
|
||||||
|
|
||||||
foreach ($cached_tables as $name => $class) {
|
foreach ($cached_tables as $name => $class) {
|
||||||
if (request()->has('clear_cache') || !Cache::has($name) || $force) {
|
if (request()->has('clear_cache') || !Cache::has($name) || $force) {
|
||||||
|
|
||||||
|
53
app/Utils/Traits/SubscriptionHooker.php
Normal file
53
app/Utils/Traits/SubscriptionHooker.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
|
*
|
||||||
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||||
|
*
|
||||||
|
* @license https://opensource.org/licenses/AAL
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Utils\Traits;
|
||||||
|
|
||||||
|
use GuzzleHttp\RequestOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class SubscriptionHooker.
|
||||||
|
*/
|
||||||
|
trait SubscriptionHooker
|
||||||
|
{
|
||||||
|
|
||||||
|
public function sendLoad($subscription, $body)
|
||||||
|
{
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Content-Type' => 'application/json',
|
||||||
|
'X-Requested-With' => 'XMLHttpRequest',
|
||||||
|
];
|
||||||
|
|
||||||
|
if(count($subscription->webhook_configuration['post_purchase_headers']) >= 1)
|
||||||
|
$headers = array_merge($headers, $subscription->webhook_configuration['post_purchase_headers']);
|
||||||
|
|
||||||
|
$client = new \GuzzleHttp\Client(
|
||||||
|
[
|
||||||
|
'headers' => $headers,
|
||||||
|
]);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$response = $client->{$subscription->webhook_configuration['post_purchase_rest_method']}($subscription->webhook_configuration['post_purchase_url'],[
|
||||||
|
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
catch(\Exception $e)
|
||||||
|
{
|
||||||
|
$body = array_merge($body, ['exception' => $e->getMessage()]);
|
||||||
|
return $body;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
137
composer.lock
generated
137
composer.lock
generated
@ -51,16 +51,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.176.8",
|
"version": "3.176.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "776b944988167fa3d563d2cbc5fcb6763424a9f0"
|
"reference": "17dc67514b148979994758fbfb54088a8a3393bf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/776b944988167fa3d563d2cbc5fcb6763424a9f0",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/17dc67514b148979994758fbfb54088a8a3393bf",
|
||||||
"reference": "776b944988167fa3d563d2cbc5fcb6763424a9f0",
|
"reference": "17dc67514b148979994758fbfb54088a8a3393bf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -135,9 +135,9 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.176.8"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.176.9"
|
||||||
},
|
},
|
||||||
"time": "2021-04-05T18:16:29+00:00"
|
"time": "2021-04-06T18:13:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@ -1851,27 +1851,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fzaninotto/faker",
|
"name": "fzaninotto/faker",
|
||||||
"version": "dev-master",
|
"version": "v1.9.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fzaninotto/Faker.git",
|
"url": "https://github.com/fzaninotto/Faker.git",
|
||||||
"reference": "5ffe7db6c80f441f150fc88008d64e64af66634b"
|
"reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/5ffe7db6c80f441f150fc88008d64e64af66634b",
|
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
|
||||||
"reference": "5ffe7db6c80f441f150fc88008d64e64af66634b",
|
"reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.3.3 || ^7.0 || ^8.0"
|
"php": "^5.3.3 || ^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-intl": "*",
|
"ext-intl": "*",
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
||||||
"squizlabs/php_codesniffer": "^2.9.2"
|
"squizlabs/php_codesniffer": "^2.9.2"
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -1900,10 +1899,10 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/fzaninotto/Faker/issues",
|
"issues": "https://github.com/fzaninotto/Faker/issues",
|
||||||
"source": "https://github.com/fzaninotto/Faker/tree/master"
|
"source": "https://github.com/fzaninotto/Faker/tree/v1.9.2"
|
||||||
},
|
},
|
||||||
"abandoned": true,
|
"abandoned": true,
|
||||||
"time": "2020-12-11T09:59:14+00:00"
|
"time": "2020-12-11T09:56:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/apiclient",
|
"name": "google/apiclient",
|
||||||
@ -2750,16 +2749,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v8.35.1",
|
"version": "v8.36.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "d118c0df39e7524131176aaf76493eae63a8a602"
|
"reference": "91c454715b81b9a39f718651d4e2f8104d45e7c2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/d118c0df39e7524131176aaf76493eae63a8a602",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/91c454715b81b9a39f718651d4e2f8104d45e7c2",
|
||||||
"reference": "d118c0df39e7524131176aaf76493eae63a8a602",
|
"reference": "91c454715b81b9a39f718651d4e2f8104d45e7c2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2914,7 +2913,7 @@
|
|||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2021-03-30T21:34:17+00:00"
|
"time": "2021-04-06T21:14:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/slack-notification-channel",
|
"name": "laravel/slack-notification-channel",
|
||||||
@ -2979,16 +2978,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/socialite",
|
"name": "laravel/socialite",
|
||||||
"version": "v5.2.2",
|
"version": "v5.2.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/socialite.git",
|
"url": "https://github.com/laravel/socialite.git",
|
||||||
"reference": "8d25d574b4f2005411c0b9cb527ef5e745c1b07d"
|
"reference": "1960802068f81e44b2ae9793932181cf1cb91b5c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/socialite/zipball/8d25d574b4f2005411c0b9cb527ef5e745c1b07d",
|
"url": "https://api.github.com/repos/laravel/socialite/zipball/1960802068f81e44b2ae9793932181cf1cb91b5c",
|
||||||
"reference": "8d25d574b4f2005411c0b9cb527ef5e745c1b07d",
|
"reference": "1960802068f81e44b2ae9793932181cf1cb91b5c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3044,7 +3043,7 @@
|
|||||||
"issues": "https://github.com/laravel/socialite/issues",
|
"issues": "https://github.com/laravel/socialite/issues",
|
||||||
"source": "https://github.com/laravel/socialite"
|
"source": "https://github.com/laravel/socialite"
|
||||||
},
|
},
|
||||||
"time": "2021-03-02T16:50:47+00:00"
|
"time": "2021-04-06T14:38:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/tinker",
|
"name": "laravel/tinker",
|
||||||
@ -3755,28 +3754,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/omnipay",
|
"name": "league/omnipay",
|
||||||
"version": "dev-master",
|
"version": "v3.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/omnipay.git",
|
"url": "https://github.com/thephpleague/omnipay.git",
|
||||||
"reference": "e9439db0633ba988e6f6cdd029fad38aad73f9f6"
|
"reference": "1ba7c8a3312cf2342458b99c9e5b86eaae44aed2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/omnipay/zipball/e9439db0633ba988e6f6cdd029fad38aad73f9f6",
|
"url": "https://api.github.com/repos/thephpleague/omnipay/zipball/1ba7c8a3312cf2342458b99c9e5b86eaae44aed2",
|
||||||
"reference": "e9439db0633ba988e6f6cdd029fad38aad73f9f6",
|
"reference": "1ba7c8a3312cf2342458b99c9e5b86eaae44aed2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"omnipay/common": "^3",
|
"omnipay/common": "^3",
|
||||||
"php": "^7.2|^8.0",
|
"php": "^7.2",
|
||||||
"php-http/discovery": "^1.12",
|
"php-http/discovery": "^1.12",
|
||||||
"php-http/guzzle7-adapter": "^0.1"
|
"php-http/guzzle7-adapter": "^0.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"omnipay/tests": "^3"
|
"omnipay/tests": "^3"
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
|
||||||
"type": "metapackage",
|
"type": "metapackage",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -3807,9 +3805,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/thephpleague/omnipay/issues",
|
"issues": "https://github.com/thephpleague/omnipay/issues",
|
||||||
"source": "https://github.com/thephpleague/omnipay/tree/master"
|
"source": "https://github.com/thephpleague/omnipay/tree/v3.1.0"
|
||||||
},
|
},
|
||||||
"time": "2021-03-12T09:17:59+00:00"
|
"time": "2020-09-22T14:02:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "livewire/livewire",
|
"name": "livewire/livewire",
|
||||||
@ -4560,21 +4558,21 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "omnipay/common",
|
"name": "omnipay/common",
|
||||||
"version": "dev-master",
|
"version": "v3.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/omnipay-common.git",
|
"url": "https://github.com/thephpleague/omnipay-common.git",
|
||||||
"reference": "e1ebc22615f14219d31cefdf62d7036feb228b1c"
|
"reference": "0d1f4486c1c873537ac030d37c7ce2986c4de1d2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/e1ebc22615f14219d31cefdf62d7036feb228b1c",
|
"url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/0d1f4486c1c873537ac030d37c7ce2986c4de1d2",
|
||||||
"reference": "e1ebc22615f14219d31cefdf62d7036feb228b1c",
|
"reference": "0d1f4486c1c873537ac030d37c7ce2986c4de1d2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"moneyphp/money": "^3.1",
|
"moneyphp/money": "^3.1",
|
||||||
"php": "^5.6|^7|^8",
|
"php": "^5.6|^7",
|
||||||
"php-http/client-implementation": "^1",
|
"php-http/client-implementation": "^1",
|
||||||
"php-http/discovery": "^1.2.1",
|
"php-http/discovery": "^1.2.1",
|
||||||
"php-http/message": "^1.5",
|
"php-http/message": "^1.5",
|
||||||
@ -4589,7 +4587,6 @@
|
|||||||
"suggest": {
|
"suggest": {
|
||||||
"league/omnipay": "The default Omnipay package provides a default HTTP Adapter."
|
"league/omnipay": "The default Omnipay package provides a default HTTP Adapter."
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -4641,9 +4638,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/thephpleague/omnipay-common/issues",
|
"issues": "https://github.com/thephpleague/omnipay-common/issues",
|
||||||
"source": "https://github.com/thephpleague/omnipay-common/tree/master"
|
"source": "https://github.com/thephpleague/omnipay-common/tree/v3.0.5"
|
||||||
},
|
},
|
||||||
"time": "2020-12-13T12:53:48+00:00"
|
"time": "2020-08-20T18:22:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "omnipay/paypal",
|
"name": "omnipay/paypal",
|
||||||
@ -5415,16 +5412,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpseclib/phpseclib",
|
"name": "phpseclib/phpseclib",
|
||||||
"version": "3.0.6",
|
"version": "3.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||||
"reference": "906a5fafabe5e6ba51ef3dc65b2722a677908837"
|
"reference": "d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/906a5fafabe5e6ba51ef3dc65b2722a677908837",
|
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d",
|
||||||
"reference": "906a5fafabe5e6ba51ef3dc65b2722a677908837",
|
"reference": "d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -5506,7 +5503,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.6"
|
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -5522,7 +5519,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-03-10T13:58:31+00:00"
|
"time": "2021-04-06T14:00:11+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pragmarx/google2fa",
|
"name": "pragmarx/google2fa",
|
||||||
@ -6683,16 +6680,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry",
|
"name": "sentry/sentry",
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/getsentry/sentry-php.git",
|
"url": "https://github.com/getsentry/sentry-php.git",
|
||||||
"reference": "899b0de58c1e01feb54829b3094af74252aff385"
|
"reference": "fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/899b0de58c1e01feb54829b3094af74252aff385",
|
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f",
|
||||||
"reference": "899b0de58c1e01feb54829b3094af74252aff385",
|
"reference": "fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6771,7 +6768,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/getsentry/sentry-php/issues",
|
"issues": "https://github.com/getsentry/sentry-php/issues",
|
||||||
"source": "https://github.com/getsentry/sentry-php/tree/3.2.0"
|
"source": "https://github.com/getsentry/sentry-php/tree/3.2.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -6783,7 +6780,7 @@
|
|||||||
"type": "custom"
|
"type": "custom"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-03-03T11:54:34+00:00"
|
"time": "2021-04-06T07:55:41+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry-laravel",
|
"name": "sentry/sentry-laravel",
|
||||||
@ -9620,16 +9617,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "turbo124/beacon",
|
"name": "turbo124/beacon",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/turbo124/beacon.git",
|
"url": "https://github.com/turbo124/beacon.git",
|
||||||
"reference": "d48227fdfafc463cce055f36b149f9cb1d9b8f81"
|
"reference": "22bc2c134efefd0f3c6c44b0c618cd4fa87b46d1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/turbo124/beacon/zipball/d48227fdfafc463cce055f36b149f9cb1d9b8f81",
|
"url": "https://api.github.com/repos/turbo124/beacon/zipball/22bc2c134efefd0f3c6c44b0c618cd4fa87b46d1",
|
||||||
"reference": "d48227fdfafc463cce055f36b149f9cb1d9b8f81",
|
"reference": "22bc2c134efefd0f3c6c44b0c618cd4fa87b46d1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -9677,9 +9674,9 @@
|
|||||||
"turbo124"
|
"turbo124"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/turbo124/beacon/tree/1.0.7"
|
"source": "https://github.com/turbo124/beacon/tree/1.0.8"
|
||||||
},
|
},
|
||||||
"time": "2021-03-23T09:54:29+00:00"
|
"time": "2021-04-07T08:16:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "turbo124/laravel-gmail",
|
"name": "turbo124/laravel-gmail",
|
||||||
@ -10367,16 +10364,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-debugbar",
|
"name": "barryvdh/laravel-debugbar",
|
||||||
"version": "v3.5.2",
|
"version": "v3.5.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||||
"reference": "cae0a8d1cb89b0f0522f65e60465e16d738e069b"
|
"reference": "b8af309dea71eab3f2c942652969f518130228ee"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/cae0a8d1cb89b0f0522f65e60465e16d738e069b",
|
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/b8af309dea71eab3f2c942652969f518130228ee",
|
||||||
"reference": "cae0a8d1cb89b0f0522f65e60465e16d738e069b",
|
"reference": "b8af309dea71eab3f2c942652969f518130228ee",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -10436,7 +10433,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.2"
|
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.4"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -10444,7 +10441,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-01-06T14:21:44+00:00"
|
"time": "2021-04-06T18:11:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brianium/paratest",
|
"name": "brianium/paratest",
|
||||||
@ -11186,16 +11183,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "friendsofphp/php-cs-fixer",
|
"name": "friendsofphp/php-cs-fixer",
|
||||||
"version": "v2.18.4",
|
"version": "v2.18.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
||||||
"reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31"
|
"reference": "e0f6d05c8b157f50029ca6c65c19ed2694f475bf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06f764e3cb6d60822d8f5135205f9d32b5508a31",
|
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/e0f6d05c8b157f50029ca6c65c19ed2694f475bf",
|
||||||
"reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31",
|
"reference": "e0f6d05c8b157f50029ca6c65c19ed2694f475bf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -11278,7 +11275,7 @@
|
|||||||
"description": "A tool to automatically fix PHP code style",
|
"description": "A tool to automatically fix PHP code style",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
|
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
|
||||||
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.4"
|
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -11286,7 +11283,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-03-20T14:52:33+00:00"
|
"time": "2021-04-06T18:37:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hamcrest/hamcrest-php",
|
"name": "hamcrest/hamcrest-php",
|
||||||
|
@ -14,7 +14,7 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', ''),
|
'app_domain' => env('APP_DOMAIN', ''),
|
||||||
'app_version' => '5.1.37',
|
'app_version' => '5.1.38',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateLicensesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
|
||||||
|
Schema::create('licenses', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
$table->string('first_name')->nullable();
|
||||||
|
$table->string('last_name')->nullable();
|
||||||
|
$table->string('email')->nullable();
|
||||||
|
$table->string('license_key')->unique()->nullable();
|
||||||
|
$table->boolean('is_claimed')->nullable();
|
||||||
|
$table->string('transaction_reference')->nullable();
|
||||||
|
$table->unsignedInteger('product_id')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('licenses');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user