jwplayer / ott-web-app

Reference implementation for JWP-powered apps
Apache License 2.0
70 stars 52 forks source link

Refactor / align payment (upgrade) integration flows #565

Open ChristiaanScheermeijer opened 3 months ago

ChristiaanScheermeijer commented 3 months ago

Description

This proposal PR is my attempt to align the subscription switch logic discrepancy between the JWP and Cleeng integration. These two features (doing the same) were implemented differently.

Motivated by #562 and #555 I'm hoping we can simplify flows and eliminate differences between providers. To disable features, we should be using the integration feature flags to keep the code intact for other providers (as long we don't have alternatives).

github-actions[bot] commented 3 months ago

Visit the preview URL for this PR (updated for commit fb0d284):

https://ottwebapp--pr565-refactor-payment-con-dffj8f27.web.app

(expires Wed, 31 Jul 2024 10:43:50 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c198f8a3a199ba8747819f7f1e45cf602b777529

borkopetrovicc commented 3 months ago

Screenshot 2024-07-03 at 13 28 40

I see the Renew subscription button on JWP side. This is not aligned wit our design where we should only have cancel subscription you can see in the link: https://www.figma.com/design/qLl8KxBOOr640h18ICx0H6/Web-app?t=UrJZI5RpFBxrWajc-0 Screenshot 2024-07-03 at 13 36 40

I have this https://github.com/jwplayer/ott-web-app/pull/565 pr that solves the problem without impacting the cleeng flow simply by using feature flag.I think we should merge this and then if we need we can refractor it later

AntonLantukh commented 2 months ago

@ChristiaanScheermeijer looks great, thank you! Just some small comments. Probably some e2e tests also need changes.

ChristiaanScheermeijer commented 2 months ago

@AntonLantukh thanks, this is still pretty POC'ish. Do you think it's worth to finish this PR? Perhaps we should do that when #563 is merged?

AntonLantukh commented 2 months ago

@AntonLantukh thanks, this is still pretty POC'ish. Do you think it's worth to finish this PR? Perhaps we should do that when #563 is merged?

@ChristiaanScheermeijer I find this approach cleaner than what we have when we try to build additional complexity on top of current logic. You can finish it if you have some time.