-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integrate retry billing with backend #44268
feat: integrate retry billing with backend #44268
Conversation
…//github.com/pasyukevich/Expensify-app into feat/integrate-retry-billing-with-be
…egrate-retry-billing-with-be
…egrate-retry-billing-with-be
…//github.com/JKobrynski/Expensify into feat/integrate-retry-billing-with-be
…//github.com/JKobrynski/Expensify into feat/integrate-retry-billing-with-be
…//github.com/JKobrynski/Expensify into feat/integrate-retry-billing-with-be
…//github.com/JKobrynski/Expensify into feat/integrate-retry-billing-with-be
…//github.com/JKobrynski/Expensify into feat/integrate-retry-billing-with-be
…egrate-retry-billing-with-be
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
This seems to me like unnatural state - if you there is nothing to retry you normally wouldnt see the button. How did you achieve this state? |
Agreed this is an unlikely stage but API could fail because of any error. This one I accidentally made the purchase on my real card. |
Well, this scenario is not handled, but then again, this particular error shouldn't happen in real scenario. In order to display the button we have to first show it to the user. There is one thing that is worth checking. There is a check that I believe should've handled it but for some reason didn't 🤔
Could you check what is the |
That's because the ideal billing status for me is Trial period for the account I am using. I recently got my trial also extended. I had added a real card for testing and which I used to transact to retry the payment. |
Seems like super edge case :D Can you check the |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-retry-payment.movAndroid: mWeb Chromemweb-chrome-retry-button.moviOS: Nativeios-retry-payment.moviOS: mWeb Safarimweb-safari-retry-payment.movMacOS: Desktopdesktop-retry-payment.mov |
In theory it should fall into this case:
and we should display banner on top |
Im on web but I couldnt reproduce that. Button is disabled for the time of request so it shouldn't be a problem slow-3g.mp4 |
I believe that testing this is super tricky in general on our end because we do need to temper with code and its not a natural flow. Im aware that it might need some followup fixes if some edge cases popup. |
Can you try on Android? Because for me on the Android emulator it is completely unusable. It shows a warning and loader also takes a lot of time? |
Yeah, checking |
Sorry it took so long, android things 😓 Had to wipe the whole thing and rebuild from scratch. Anyway, here is video without any network throttling. On poor LTE it also worked fine. Not sure how well this feature works on android but when Ive swapped network type to poor GSM it loaded for like 2 min so I didnt record retrying that :D android-retry.mp4 |
Weird I can't reproduce the issue anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah testing this is quite tricky. I think we're good to move forward though. @mananjadhav I checked off the android portion of your reviewer checklist since @MrMuzyk showed the android version working correctly.
There will probably be follow up as we start testing this with more end-to-end flows, and that is okay 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Thanks @blimpich. Yeah I couldn't reproduce the issue at my end, and I was able to test it successfully. I uploaded the Android video. |
🚀 Deployed to staging by https://github.com/blimpich in version: 9.0.4-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/tgolen in version: 9.0.4-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
isDisabled={isOffline || !billingStatus?.isRetryAvailable} | ||
isLoading={subscriptionRetryBillingStatusPending} | ||
onPress={handleRetryPayment} | ||
style={[styles.w100, styles.mt5]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a case where when the first menu item is Request early cancellation
, there is no space between Add payment card
and Request early cancellation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c3024 can you provide a screenshot and repro steps? Then I will make a issue and cc you on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
Added
Retry payment
button and logic that retries the paymentFixed Issues
$ #42434
PROPOSAL:
Tests
Go directly to subscription page - https://dev.new.expensify.com:8082/settings/subscription
Testing this might be tricky and may require some code changes in order to display both cases.
One way of testing is to have some cards added and modify util method in order to return
early object we want to check
For example: Edit
src/pages/settings/Subscription/CardSection/utils.ts
to return status early ingetBillingStatus
Offline tests
QA Steps
Go directly to subscription page - https://dev.new.expensify.com:8082/settings/subscription
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-07-02.at.12.11.08.mov
MacOS: Desktop