flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

Add credit card support to flutter_stripe web

Open venkatd opened this issue 2 years ago • 4 comments

WIP: Proof of concept not yet ready for merge.

Right now the createToken method is unimplemented for the web platform. This PR implements it to add credit card support.

I haven't checked yet how to handle CreateTokenParams. I suppose I'll need to pass these options along to the javascript createToken function.

Feel free to review, ignore, or use for a future implementation. Whatever is most efficient for you all :)

cc @jonasbark @jamesblasco

Video of internal prototype:

https://user-images.githubusercontent.com/220686/178574671-9ee35a8a-bae7-4c0c-84de-8eb64fe583ac.mp4

P.S. I was hoping to sponsor a bit of development to get this package working on the web platform, but I was unable to get in touch with folks over email. Not sure on the best person to contact or if the team has their hands full.

venkatd avatar Jul 12 '22 19:07 venkatd

Hi @venkatd ! Thanks for that PR. We're actively looking into how to proceed with Web support. We will have a meeting with Stripe, soon. If we manage to solve the initial issues (talking back and forth to the javascript library) the plan is to provide proper support. No promises, though.

In regards to sponsoring: I've read your mail. The best way to sponsor the development is by heading over to https://opencollective.com/flutter_stripe - by doing so we can ensure that all sponsorship is evenly and transparently divided to the active maintainers. Thank you!

jonasbark avatar Jul 12 '22 19:07 jonasbark

Hey all, I don't consider this code production ready and thoroughly tested, but I've been focused getting whatever is needed in here to unblocking our team.

It might be best used as inspiration once you decide on the best direction to take the web implementation.

venkatd avatar Jul 15 '22 17:07 venkatd

thank you for your contribution we are thinking about a way to properly support the web and will come with a solid plan after the hoildays

remonh87 avatar Jul 22 '22 07:07 remonh87

@remonh87 sure no problem!

I'm happy to jump on a call with the implementor to share what we learned so far. We have some things working for Google Pay, Apple Pay, and credit cards.

venkatd avatar Jul 22 '22 10:07 venkatd

@jamesblasco your PR will make this PR obsolete - correct? https://github.com/flutter-stripe/flutter_stripe/pull/1079

jonasbark avatar Jan 20 '23 16:01 jonasbark

Hi! Yess this feature was added together with big internal refactors needed in the library. I will close the PR but I am really grateful for the contribution 🙏🏼

jamesblasco avatar Jun 03 '23 07:06 jamesblasco