code-corps/ember-stripe-service

stripe v3 support?

Closed this issue · 11 comments

st-h commented

Are there any plans to support the stripe v3 api?

the stripe docs currently state:

Starting September 2019, a new regulation called Strong Customer Authentication (SCA) will require businesses in Europe to request additional authentication for online payments. To be ready for these rule changes, we recommend that all European businesses start building their Stripe integration with either our PaymentIntents API or our new Checkout.

Migrating your Stripe integration
If your Stripe integration does not yet use Stripe.js v3 and Elements, you may wish to first update your integration accordingly before adopting PaymentIntents. It is, however, still possible to use PaymentIntents without Elements by creating a source on the client side and attaching it to the PaymentIntent.

I am not 100% sure yet if this really requires the use of v3, but still it might be a good idea to support. I noticed that there also is ember-stripe-elements which uses v3, however that appears to be no longer maintained? how is that project related to this repo?

@st-h Looking into it right now. stripe-elements provides the components to consume. This addon sets the script tag + can create tokens. Reasonable to use both addons in one!

Currently looking at v3 support here - #70

st-h commented

@snewcomer thanks for your reply. I am not sure if you have noticed, I left a comment over at ember-stripe-elements that I published a temporary fork which incorporates several fixes and improvements that I also submitted as PRs. Do you know anything about the ember-stripe-elements repo as it seems to be the same organisation?

It seemed to me that v3-elements works quite differently than v2 - so it seemed to make more sense to build things upon ember-stripe-elements. However, I would love to see stripe v3 support baked into one of the existing addons, as I would rather help to maintain an existing one than maintain a fork of another addon doing the same thing.

My initial thought is keeping separate responsibilities would be a good idea. Updating to v3 would necessitate a major bump in this repo. I’ll look over your fork and ping you for a review once the v3 update is done if you don’t mind!

st-h commented

yeah, that's fine with me. I'll be happy to help if I can find the time

After looking at this further, the new API takes the Stripe.Element instead of an object of values. This means that for this addon to work, it necessarily needs the element. Perhaps we need to stick this to v2 and do most of the work in ember-stripe-elements (e.g. incorporating your work). @st-h What do you think?

https://stripe.com/docs/stripe-js/elements/migrating#elements-demo

st-h commented

@snewcomer that actually has been my intention as well. The changes I would have had to make to this repo to incorporate v3 seemed a bit too invasive to me, so I went with updating ember-stripe-elements even though its future seems to be questionable. Are you able to release ember-stripe-elements, or do you know anybody with write permission to the repo? If so, I would be happy if we can resurrect that add-on and I will deprecate my releases.

I will work on getting permissions. Feel free to make a PR! 🙇

st-h commented

@snewcomer awesome! just a little confused about the PR. what should it contain?

oh didn't you say you had a fork with a bunch of changes?

st-h commented

@snewcomer exactly :)
fork: https://github.com/st-h/ember-stripe-elements

PRs:
code-corps/ember-stripe-elements#42
code-corps/ember-stripe-elements#43
code-corps/ember-stripe-elements#44

I submitted the PRs some time before I released the fork - I don't think I made further changes unless changing the name and version... However, I'll be happy to diff the merged PRs against my fork to check if I missed anything.

st-h commented

@snewcomer just wanted to check if there are any news regarding ember-stripe-elements?