Skip to content

[HOLD for payment 2024-11-07] [CVP] [$250] If you click "Pay with Expensify" and the payment fails (e.g., due to a bank account setup error), the option disappears, leaving only "Pay Elsewhere." #49576

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

Closed
1 of 6 tasks
m-natarajan opened this issue Sep 22, 2024 · 59 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Sep 22, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.39-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @ryanschaffer
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1726864011581859

Action Performed:

  1. Create new test account.
  2. Submit an expense to a new account that hasn’t been created yet
  3. Log in to account 2 and try to pay the expense submitted from account 1
  4. Mess up the bank flow
  5. Try to restart the payment flow and see that the only option is Pay Elsewhere

Expected Result:

If you try to restart the payment flow a 2nd time, it works the same it did the first time.

Actual Result:

The 2nd time, you don’t get the Pay with Expensify option and only the Pay Elsewhere option is available.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

image

Recording.568.mp4

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021838883742527613450
  • Upwork Job ID: 1838883742527613450
  • Last Price Increase: 2024-09-25
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 22, 2024
Copy link

melvin-bot bot commented Sep 22, 2024

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added the Overdue label Sep 24, 2024
@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 25, 2024
@melvin-bot melvin-bot bot changed the title If you click "Pay with Expensify" and the payment fails (e.g., due to a bank account setup error), the option disappears, leaving only "Pay Elsewhere." [$250] If you click "Pay with Expensify" and the payment fails (e.g., due to a bank account setup error), the option disappears, leaving only "Pay Elsewhere." Sep 25, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021838883742527613450

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 25, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2024
@Ace0328
Copy link

Ace0328 commented Sep 25, 2024

To resolve this issue, you should ensure that the resendTransaction method is correctly defined and implemented in the appropriate file within your codebase, and that the import statement or class extension is set up correctly if it is inherited from a parent class or imported from a library. You should also ensure that there are no typos or errors in the method name, and that all required dependencies are correctly installed and referenced.

Copy link

melvin-bot bot commented Sep 25, 2024

📣 @Ace0328! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Ace0328
Copy link

Ace0328 commented Sep 25, 2024

Email:[email protected]
Upwork Profile link:https://www.upwork.com/freelancers/~017675b79a86fc30f6

@Ace0328
Copy link

Ace0328 commented Sep 25, 2024 via email

@shahinyan11
Copy link

shahinyan11 commented Sep 25, 2024

@m-natarajan Hi. The issue does not reproducible with the steps described in Action Performed: section. There is not a button with the "Pay $xx with Expensify" label . Could you provide a video showing the entire flow of actions?

@mananjadhav
Copy link
Collaborator

Proposal

Please re-state the problem that we are trying to solve in this issue.

We're disabling the wallet options for the expense report. Hence we don't see "Pay with Expensify" for the workspace payments.

What is the root cause of that problem?

After clicking the "Pay with Expensify" option and selecting the "Business Bank Account", we move the payment to a new workspace and the payment type becomes CONST.REPORT.TYPE.EXPENSE. The "Pay with Expensify" option is dependent on the "canUseWallet" as shown in the code below.

const canUseWallet = !isExpenseReport && !isInvoiceReport && currency === CONST.CURRENCY.USD;
// Only show the Approve button if the user cannot pay the expense
if (shouldHidePaymentOptions && shouldShowApproveButton) {
return [approveButtonOption];
}
// To achieve the one tap pay experience we need to choose the correct payment type as default.
if (canUseWallet) {
buttonOptions.push(paymentMethods[CONST.IOU.PAYMENT_TYPE.EXPENSIFY]);
}

The flag canUseWallet is false isExpenseReport is true which is in our case.

What changes do you think we should make in order to solve the problem?

  • Remove isExpenseReport check from the condition. The flag will now be conditioned as:
const canUseWallet = !isInvoiceReport && currency === CONST.CURRENCY.USD;

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Sep 30, 2024

@akinwale, @dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
@ryanschaffer
Copy link

I just retested this. Another way to make the Pay with Expensify option disappear is to just exit out of the Plaid flow. I was testing this flow, realized I wasn't on staging so reloaded on staging and Pay Elsewhere was the only option

@melvin-bot melvin-bot bot removed Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 1, 2024
@allroundexperts
Copy link
Contributor

@mananjadhav's proposal looks good to me. However, before proceeding, I'd like the assigned engineer to confirm that the user can use the wallet if its an expense report?

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@trjExpensify
Copy link
Contributor

trjExpensify commented Oct 1, 2024

Hm, I don't think the wallet has anything to do with expense reports, that's a P2P IOUReport feature.

I actually think the crux of the problem is that the workspace created has reimbursementChoice=manual on creation because a VBBA hasn't been added to the workspace successfully yet to set that to reimbursementChoice=yes for in-app payments on workspaces.

So we need to decide if we want to show the "Pay with Expensify" button in the dropdown for USD workspaces if reimbursementChoice=manual. If that option in the pay button is clicked, launch the connect bank account VBBA flow, and when successfully added it will update to reimbursementChoice=yes.

CC: @JmillsExpensify I think we should do this, but let me know what you think.

@JmillsExpensify
Copy link

Hm, I don't think the wallet has anything to do with expense reports, that's a P2P IOUReport feature.

Agreed

So we need to decide if we want to show the "Pay with Expensify" button in the dropdown for USD workspaces if reimbursementChoice=manual. If that option in the pay button is clicked, launch the connect bank account VBBA flow, and when successfully added it will update to reimbursementChoice=yes.

Also agree here. Let's do it.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 22, 2024
@mananjadhav
Copy link
Collaborator

Thanks, will raise the PR.

@joekaufmanexpensify
Copy link
Contributor

Great. TY!

@joekaufmanexpensify
Copy link
Contributor

Pending PR

@mananjadhav
Copy link
Collaborator

Will be pushed in 2-3 hours, just testing changes locally.

@joekaufmanexpensify
Copy link
Contributor

Sounds great. TY!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 25, 2024
@joekaufmanexpensify
Copy link
Contributor

PR in review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 31, 2024
@melvin-bot melvin-bot bot changed the title [CVP] [$250] If you click "Pay with Expensify" and the payment fails (e.g., due to a bank account setup error), the option disappears, leaving only "Pay Elsewhere." [HOLD for payment 2024-11-07] [CVP] [$250] If you click "Pay with Expensify" and the payment fails (e.g., due to a bank account setup error), the option disappears, leaving only "Pay Elsewhere." Oct 31, 2024
Copy link

melvin-bot bot commented Oct 31, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 31, 2024
Copy link

melvin-bot bot commented Oct 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.55-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-07. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 31, 2024

@mananjadhav / @allroundexperts @joekaufmanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@joekaufmanexpensify
Copy link
Contributor

@allroundexperts could you tackle the checklist this week so I can prep for payment?

@allroundexperts
Copy link
Contributor

Checklist

  1. I don't think that any particular PR caused this issue. It seems like this was an edge case which we did not have a clearly defined behaviour for.
  2. N/A
  3. N/A
  4. A regression test would be helpful here.

Regression Test

  1. Create new test account
  2. Submit an expense to a new account that hasn’t been created yet
  3. Log in to account 2 and try to pay the expense submitted from account 1
  4. Cancel the bank account setup flow
  5. In the workspace page, check the payment option. "Pay with Expensify" should be visible

Do we 👍 or 👎 ?

@joekaufmanexpensify
Copy link
Contributor

Great. TY! I will action.

@joekaufmanexpensify joekaufmanexpensify added Daily KSv2 and removed Weekly KSv2 labels Nov 7, 2024
@joekaufmanexpensify
Copy link
Contributor

Regression test created: https://github.com/Expensify/Expensify/issues/442826

@joekaufmanexpensify
Copy link
Contributor

All set to issue payment. We need to pay:

Feel free to request payment as soon as you're both ready!

@joekaufmanexpensify
Copy link
Contributor

Closing for now, as both contributors will request payment whenever they are ready to. Thanks everyone!

@garrettmknight
Copy link
Contributor

$250 approved for @mananjadhav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Development

No branches or pull requests