#ravelens-schedule-php

1 messages · Page 1 of 1 (latest)

outer lanternBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

round dew
#

Sorry can you give me a more clear description of your problem

high veldt
#

I tried to run command to cancel my scheduled subscription
But it returned error
And the error message is :
Non-static method Stripe\SubscriptionSchedule::cancel() cannot be called statically

#

Here is my code :
SubscriptionSchedule::cancel($current_plan->stripe_id);

#

And here is the error
"message": "Non-static method Stripe\SubscriptionSchedule::cancel() cannot be called statically",
"exception": "Error",

signal remnant
#

you're using an older way to use our stripe-php SDK and with your way you have to first retrieve the schedue and then cancel it (because the method is an instance method)

high veldt
#

Ahh i see
So i need to retrieve first
Let me try first then
Thank you

#

And anyway you said i am using older way
May i know which one is newer one ?

signal remnant
#

ah sorry that's the one detailed in the link above

#

it's also what you see in all our docs, where you create a StripeClient first and then use like. $stripe->subscriptionSchedules->cancel() instead of \Stripe\SubscriptionSchedules::cancel()

#

ravelens-schedule-php

signal remnant
#

@high veldt any other question before we close this thread?

high veldt
#

Yes, it solved my case
Thank you