firebase-subscription-payments icon indicating copy to clipboard operation
firebase-subscription-payments copied to clipboard

bugfix: fix extensions function name

Open mogmet opened this issue 2 years ago • 3 comments

The function names used in extension have been changed. In this PR, the function names have been modified to follow the changes.

https://github.com/stripe/stripe-firebase-extensions/blob/b2d6f244b378e117630a4adbb50aabf21961b525/firestore-stripe-payments/CHANGELOG.md#version-0115---2021-08-26

mogmet avatar Sep 13 '22 22:09 mogmet

@thorsten-stripe Can I have this PR reviewed?

mogmet avatar Sep 18 '22 21:09 mogmet

@thorsten-stripe @cjavilla-stripe Can I have this PR reviewed?

mogmet avatar Oct 04 '22 22:10 mogmet

If you are getting any CORS errors in the Stripe Firebase app, it is due to this incorrect Firebase function name. You can make the change manually in your app.js file until Stripe devs merge this PR.

Before

    const functionRef = firebase
      .app()
      .functions(functionLocation)
      .httpsCallable('ext-firestore-stripe-subscriptions-createPortalLink');
    const { data } = await functionRef({ returnUrl: window.location.origin });
    window.location.assign(data.url);
  });

After

    const functionRef = firebase
      .app()
      .functions(functionLocation)
      .httpsCallable('ext-firestore-stripe-payments-createPortalLink');
    const { data } = await functionRef({ returnUrl: window.location.origin });
    window.location.assign(data.url);
  });

labnol avatar Nov 13 '22 08:11 labnol