mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for subscriptions
This commit is contained in:
parent
d6f1caef73
commit
fd3993d84e
@ -389,12 +389,9 @@ class BillingPortalPurchase extends Component
|
|||||||
|
|
||||||
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
$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'] = true;
|
||||||
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
|
$this->steps['not_eligible_message'] = $is_eligible['message'];
|
||||||
$this->steps['show_loading_bar'] = false;
|
$this->steps['show_loading_bar'] = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -631,7 +631,7 @@ class SubscriptionService
|
|||||||
public function triggerWebhook($context)
|
public function triggerWebhook($context)
|
||||||
{
|
{
|
||||||
if (empty($this->subscription->webhook_configuration['post_purchase_url']) || empty($this->subscription->webhook_configuration['post_purchase_rest_method'])) {
|
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;
|
$response = false;
|
||||||
@ -652,10 +652,7 @@ class SubscriptionService
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$status = $response->getStatusCode();
|
$body = $response->getStatusCode();
|
||||||
|
|
||||||
//$response_body = $response->getReasonPhrase();
|
|
||||||
//$body = array_merge($body, ['status' => $status, 'response_body' => $response_body]);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user