#pro-pooja
1 messages · Page 1 of 1 (latest)
My bad, I want to cancel subscription
This is how to cancel a subscripiton in PHP: https://stripe.com/docs/api/subscriptions/cancel?lang=php
I want to mock the flow.
I4m not sure I understand exactly what you want to do. But we do have a stripe-mock library: https://github.com/stripe/stripe-mock
I am writing a test case, I want to write test case for cancel subscription.
If you want to actually cancel a susbcription, use https://stripe.com/docs/api/subscriptions/cancel?lang=php
If you want to do a mock, then use https://github.com/stripe/stripe-mock
I am not sure how to use stripe-mock in laravel.
- Run the mock server
- When you intialize the Stripe library, point it to the mock server with the
hostparameter (to be confirmed) - Then when you make a Stripe API call, it doesn't go to Stripe bu to the mock server