subscription-use-cases icon indicating copy to clipboard operation
subscription-use-cases copied to clipboard

Wrong Method Call For Cancelling Subscription

Open eltonSalanic opened this issue 9 months ago • 0 comments

Bug report

Describe the bug

In the fixed-price-subscriptions node server (server.js), the wrong method to cancel the subscription is being called.

To Reproduce

  1. Run the client-side and server-side code
  2. Use the application as demonstrated in the demo.gif
  3. After cancelling subscription, you are redirected to the Account page, where the status remains active and an error is shown in browser console

Expected behavior

The subscription status should be cancelled when returning to the Account page

System information

  • OS: macOs
  • Browser: Chrome
  • Server environment: Node

Additional context

In the '/cancel-subscription' endpoint, stripe.subscriptions.del() should be replaced with stripe.subscriptions.cancel().

eltonSalanic avatar Mar 03 '25 16:03 eltonSalanic