Comments (8)
Hey everyone. The reason why subscribed is returning true is that the subscription might be deleted but it's on its cancellation grace period (see the date in the "ends_at" column).
If you want to immediately cancel a subscription you need to use ->cancelNow
. See the docs here: https://laravel.com/docs/8.x/cashier-paddle#cancelling-subscriptions
from cashier-paddle.
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
from cashier-paddle.
@driesvints For me I also have a deleted subscription in my subscriptions table but a call to $user->subscriptions()->active()->get()
returns that subscription. I would have expected active()
to only return a valid subscription. Does the implementation consider a deleted subscription still active?
from cashier-paddle.
The problem is that some subscriptions in certain systems carries on after the cancellation while others need to be partially refunded(like in mine) or you get extra API call cost(or proxy usage and so on). In my case, the subscription when deleted, if cannot be active. I had to modify the code for my case. This is why I was confused when I saw that a deleted subscription was still considered active.
from cashier-paddle.
I am having the same problem, what is the best way to go around with this ?, how can we make sure that the user has an active subscription after all even if it was cancelled ?
from cashier-paddle.
This is how it works at the moment:
if ($user->subscribed('default')) {
logger('true');
}else{
logger('false');
}
If the subscription has been cancelled, it will still return true until the date reaches the last day of the subscription(ends_at column). In your case, it is fine.
from cashier-paddle.
This is also the same reason why the active
scope still returns the subscription. It's still an active subscription until its grace period has passed. This works the same in Cashier Stripe.
from cashier-paddle.
Thanks @driesvints! I was having the same problem and that solved it for me.
I had a subscription that was canceled in Stripe and the webhook didn't update the subscription on my local dev environment, so I manually updated the stripe_status
field to "canceled" and was really frustrated why $user->subscription('default')->ended()
and $user->subscription('default')->canceled()
were both still returning false
. I guess the ends_at
field is really the only one that matters. The stripe_status
is really just a user friendly string in case you want to display it to the end user.
from cashier-paddle.
Related Issues (20)
- Disable generic trial once customer is subscribed HOT 1
- Fix incrementQuantity() & decrementQuantity() Throwing Error HOT 5
- Notice in the docs about "default checkout URL" HOT 1
- [2.x] add end at of the subscription period HOT 1
- Fix nextPayment() total HOT 1
- returnTo function added to checkout does not redirect HOT 6
- Bill for non-catalog items HOT 5
- Issues with subscriptions "price_id must be a string" HOT 4
- Webhook duplicating the response statuses HOT 8
- Cashier::findBillable($customerId) not returning anythying HOT 2
- Get subscription payment method HOT 1
- Add support for authentication via client-side tokens HOT 1
- Paddle webhook handler doesnt work HOT 3
- Laravel cashier-paddle package conflict with passport Auth Header HOT 1
- Paddle with Passport giving: Authentication header included, but incorrectly formatted HOT 3
- Pausing Subscriptions HOT 1
- Applying a discount on checkout HOT 1
- Problem with billing API - Transaction not created in the db HOT 13
- Changing email on the payment screen HOT 5
- Activate subscription is not working. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cashier-paddle.