Skip to content

Commit d7c38ce

Browse files
committed
More subscription-deleted bugfixes.
1 parent 9464f2f commit d7c38ce

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Mmanos/Billing/Gateways/Stripe/WebhookController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ protected function handleInvoicePaymentSucceeded(array $payload)
9595
protected function handleCustomerSubscriptionDeleted(array $payload)
9696
{
9797
if ($subscription = $this->getSubscription($payload['data']['object']['id'])) {
98-
$subscription->subscription()->refresh();
98+
if ($subscription->billingIsActive()) {
99+
$subscription->subscription()->refresh();
100+
}
99101
}
100102

101103
return new Response('Webhook Handled', 200);

src/Mmanos/Billing/SubscriptionBillableTrait/Subscription.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,6 @@ public function decrement($count = 1)
353353
*/
354354
public function refresh()
355355
{
356-
if ($this->model->billing_free) {
357-
return $this;
358-
}
359-
360356
$info = array();
361357
if ($this->subscription) {
362358
try {

0 commit comments

Comments
 (0)