mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge pull request #5910 from turbo124/v5-develop
Fixes for subscriptions
This commit is contained in:
commit
f94dbb9534
@ -389,12 +389,9 @@ class BillingPortalPurchase extends Component
|
||||
|
||||
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
||||
|
||||
if($is_eligible){
|
||||
|
||||
}
|
||||
elseif ($is_eligible['status_code'] != 200) {
|
||||
if ($is_eligible['status_code'] != 200) {
|
||||
$this->steps['not_eligible'] = true;
|
||||
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
|
||||
$this->steps['not_eligible_message'] = $is_eligible['message'];
|
||||
$this->steps['show_loading_bar'] = false;
|
||||
|
||||
return;
|
||||
|
@ -44,7 +44,7 @@ class SchedulerCheck implements ShouldQueue
|
||||
{
|
||||
|
||||
try {
|
||||
Artisan::call('migrate', ['--force' => 'true']);
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
} catch (\Exception $e) {
|
||||
nlog("I wasn't able to migrate the data.");
|
||||
nlog($e->getMessage());
|
||||
|
@ -57,9 +57,9 @@ class UpdateUserLastLogin implements ShouldQueue
|
||||
if($user->ip != $ip)
|
||||
{
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new UserLoggedIn($user, $user->account->companies()->first(), $ip);
|
||||
$nmo->company = $user->account->companies()->first();
|
||||
$nmo->settings = $user->account->companies()->first()->settings;
|
||||
$nmo->mailable = new UserLoggedIn($user, $user->account->companies->first(), $ip);
|
||||
$nmo->company = $user->account->companies->first();
|
||||
$nmo->settings = $user->account->companies->first()->settings;
|
||||
$nmo->to_user = $user;
|
||||
NinjaMailerJob::dispatch($nmo);
|
||||
|
||||
|
@ -133,7 +133,7 @@ class Company extends BaseModel
|
||||
|
||||
public function all_documents()
|
||||
{
|
||||
return $this->HasMany(Document::class);
|
||||
return $this->hasMany(Document::class);
|
||||
}
|
||||
|
||||
public function getEntityType()
|
||||
|
@ -631,7 +631,7 @@ class SubscriptionService
|
||||
public function triggerWebhook($context)
|
||||
{
|
||||
if (empty($this->subscription->webhook_configuration['post_purchase_url']) || empty($this->subscription->webhook_configuration['post_purchase_rest_method'])) {
|
||||
return ['status_code' => 200];
|
||||
return ["message" => "Success", "status_code" => 200];
|
||||
}
|
||||
|
||||
$response = false;
|
||||
@ -652,10 +652,7 @@ class SubscriptionService
|
||||
}
|
||||
else {
|
||||
|
||||
$status = $response->getStatusCode();
|
||||
|
||||
//$response_body = $response->getReasonPhrase();
|
||||
//$body = array_merge($body, ['status' => $status, 'response_body' => $response_body]);
|
||||
$body = $response->getStatusCode();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user