mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for billing portal
This commit is contained in:
parent
91ff3e8fa3
commit
fc444b7c39
@ -339,7 +339,7 @@ class BillingPortalPurchase extends Component
|
||||
|
||||
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
||||
|
||||
if (is_array($is_eligible) && $is_eligible['exception']['message'] != 'Success') {
|
||||
if (($is_eligible) || is_array($is_eligible) && $is_eligible['exception']['message'] != 'Success') {
|
||||
$this->steps['not_eligible'] = true;
|
||||
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
|
||||
$this->steps['show_loading_bar'] = false;
|
||||
@ -378,8 +378,11 @@ class BillingPortalPurchase extends Component
|
||||
{
|
||||
|
||||
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
||||
|
||||
if($is_eligible){
|
||||
|
||||
if ($is_eligible['status_code'] != 200) {
|
||||
}
|
||||
elseif ($is_eligible['status_code'] != 200) {
|
||||
$this->steps['not_eligible'] = true;
|
||||
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
|
||||
$this->steps['show_loading_bar'] = false;
|
||||
|
@ -28,6 +28,6 @@ class VerifyCsrfToken extends Middleware
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
'livewire/message/*'
|
||||
// 'livewire/message/*'
|
||||
];
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ class SubscriptionService
|
||||
|
||||
$days_in_frequency = $this->getDaysInFrequency();
|
||||
|
||||
nlog("days to charge = {$days_to_charge} fays in frequency = {$days_in_frequency}");
|
||||
nlog("days to charge = {$days_to_charge} days in frequency = {$days_in_frequency}");
|
||||
|
||||
$pro_rata_charge = round(($days_to_charge/$days_in_frequency) * $invoice->amount ,2);
|
||||
|
||||
@ -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 true;
|
||||
return ['status_code' => 200];
|
||||
}
|
||||
|
||||
$response = false;
|
||||
|
@ -54,9 +54,8 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
//'asset_url' => env('ASSETS_URL', config('app.url')),
|
||||
'asset_url' => env('ASSETS_URL', config('app.url')),
|
||||
|
||||
'asset_url' => '',
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Endpoint Middleware Group
|
||||
|
@ -152,6 +152,7 @@ return [
|
||||
'ninja_stripe_client_id' => env('NINJA_STRIPE_CLIENT_ID', null),
|
||||
'ninja_default_company_id' => env('NINJA_COMPANY_ID', null),
|
||||
'ninja_default_company_gateway_id' => env('NINJA_COMPANY_GATEWAY_ID', null),
|
||||
'ninja_hosted_secret' => env('NINJA_HOSTED_SECRET', null),
|
||||
'pdf_generator' => env('PDF_GENERATOR', false),
|
||||
'internal_queue_enabled' => env('INTERNAL_QUEUE_ENABLED', true),
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user