#codingwisely
1 messages ยท Page 1 of 1 (latest)
Hello! The only way to do this would be to clear out all your test data
in progress! ๐
thank you so so much! ๐ its so obvious place lol
regardless i never saw it before ๐
you rock @vapid peak !
happy to help!
aw shoot
it removed my producst!
arght
can you revert it ?
thought this will do what i wanted to remove test users and transactions so did not read when started
pfew
You can check with support (https://support.stripe.com/contact) but I don't think there's a way to revert it
ah never mind then
Sorry I should've double checked that you were actually okay with deleting all your test data - I assumed you wanted it all gone
i need to delete only test users wnd their related cards and transactions - is that possible?
YOu can delete the cusotmers and their cards, but it's not possible to delete the transactions once they've been made
so i am using my test user- someone@somedomain.com
and then i am working on my local machine
i create a charge
then i create subsription
etc
then i destroy my local database
and create a new one and again, sam euser i use to subscribe
now, when i pull charges for that user from stripe, i get bunch of them, all from before
and i need only one ๐
lets create a new product catalog and payment links lol
Instead of using the same user why don't you create a new stripe Customer and use that?
i am using login via social media
so on my saas user logs in via social media
and his email is used to purchase subscription
and i always just click - login via github
What I'm saying is that you can delete the Stripe Customer that was tied to that email (when you destroy your local database)
simplest way to get to subscription page
ah, i do so
i delete customers
but when i again create one
i see like history of transactions in stripe customer page
that are old ones, plus the one i just recreated if you got mt?
me
Is this in the dashboard? Or your own page that you built?
its in Stripe Customer page
on my own page i still did not finish layout ๐
i will now recreate products and once i manage to make again what i am talking about, i will screenshot it to you
How are you retrieving all the charges related to that customer? Are you doing it based on Customer ID
let me see in code
$charges->charges->all(['customer' => auth()->user()->stripe_id]);
so i am using his customer id
maybe you can actually advise me for the best practice here:
May i feel free to ask?
Yeah go ahead
I am having 3 kind of plans-
Subscriptions - monthly
Subscription - yearly
One time payment- Lifetime membership
Now, it looks very ugly in code to try to check if user get any of these plans
IF its only subscriprion i will check if user->subscribed('mobthly;) || user->subscibed('yearly') - it means he has subscibed
but one time payment i can check with user->subscribed()
($user->subscribed()) comes from Laravel cashier, and its a wrapper around Stripe php lin
What would be the best way to check if user has any active payment? either life time memberhsip or active subscription
We don't maintina the laravel cashier library so you'll need to check to see what they suggest. Generally, I'd say the easiest way to check this would be to store this in your own databases to easily know if they have a current subscription
i wish stripe has subsrition to renew every 10 years ๐
yes they have own databse for subscriptions, nothing for charges
cool
i ll figure it somehow, probably make my own record for charges
thank you karbi
i appreciate you
๐