Skip to content
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

[HOLD for payment 2024-12-03] [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up #52371

Closed
5 of 8 tasks
IuliiaHerets opened this issue Nov 12, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 12, 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.60-0
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new workspace.
  3. Submit an expense.
  4. Go to Search.
  5. Click Pay.
  6. Click on the dropdown.
  7. Select Pay with Expensify (select the same option even when the button shows Pay with Expensify).
  8. Close the RHP.
  9. Click Pay button.

Expected Result:

There should be a message informing that the payment cannot be carried out because bank account is not set up.

Actual Result:

The pay button can be clicked several times and there is no error message at all.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6662295_1731406258412.20241112_180612.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @luacmartins
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

Triggered auto assignment to @greg-schroeder (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.

Copy link

melvin-bot bot commented Nov 12, 2024

Triggered auto assignment to @rlinoz (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 12, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@rlinoz
Copy link
Contributor

rlinoz commented Nov 12, 2024

Probably related to this PR #51445

But I am not sure we have a pattern for showing errors in Search, checking here https://expensify.slack.com/archives/C01GTK53T8Q/p1731409542501669

@rlinoz rlinoz removed the DeployBlockerCash This issue or pull request should block deployment label Nov 12, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Nov 12, 2024

We are adding RBR in another PR #52333 and this is still under construction, so we don't need to block on this and can close it.

@rlinoz rlinoz closed this as completed Nov 12, 2024
@etCoderDysto
Copy link
Contributor

Proposal

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

Pay button can be clicked many times without error when bank account is not set up

What is the root cause of that problem?

Here we are only check for if lastPolicyPaymentMethod is not undefined before we call payMoneyRequestOnSearch.

return lastPolicyPaymentMethod ? payMoneyRequestOnSearch(hash, [{reportID: item.reportID, amount, paymentType: lastPolicyPaymentMethod}], transactionID) : goToItem();

When user selects Pay with Expensify on step 7, lastPolicyPaymentMethod becomes 'ACH' payMoneyRequestOnSearch will be called. And the payment won't be settled since Pay with Expensify is not configured

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

Instead we should call payMoneyRequestOnSearch if lastPolicyPaymentMethod is equal to Elsewhere or if the user has an expensify payment method configured

const [fundList = {} ] = useOnyx(ONYXKEYS.FUND_LIST);
const [bankAccountList = {}] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST);

const hasExpensifyPaymentMethod = PaymentUtils.hasExpensifyPaymentMethod(paymentCardList, bankAccountList, false))

lastPolicyPaymentMethod === 'Elsewhere' || hasExpensifyPaymentMethod ? payMoneyRequestOnSearch(hash, [{reportID: item.reportID, amount, paymentType: lastPolicyPaymentMethod}], transactionID) : goToItem();

What alternative solutions did you explore? (Optional)

@luacmartins luacmartins changed the title Search - Pay button can be clicked many times without error when bank account is not set up [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up Nov 12, 2024
@luacmartins luacmartins self-assigned this Nov 12, 2024
@luacmartins
Copy link
Contributor

luacmartins commented Nov 12, 2024

I'll reopen this issue and assign it to me so I can make sure it's fixed in my PR

@luacmartins luacmartins added Daily KSv2 and removed Hourly KSv2 labels Nov 12, 2024
@luacmartins luacmartins reopened this Nov 12, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Weekly KSv2 labels Nov 12, 2024
Copy link

melvin-bot bot commented Nov 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-3 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-20. 🎊

Copy link

melvin-bot bot commented Nov 13, 2024

@rlinoz / @luacmartins @greg-schroeder @rlinoz / @luacmartins 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]

@luacmartins luacmartins changed the title [HOLD for payment 2024-11-20] [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up Nov 13, 2024
@luacmartins
Copy link
Contributor

@rlinoz @greg-schroeder we fixed the issue via a revert. I'll unassign you but keep the issue open to make sure I address it in the v2 of my PR

@luacmartins luacmartins added Daily KSv2 and removed Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Nov 13, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Nov 14, 2024
@melvin-bot melvin-bot bot changed the title [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up [HOLD for payment 2024-11-21] [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up Nov 14, 2024
Copy link

melvin-bot bot commented Nov 14, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.61-3 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-21. 🎊

Copy link

melvin-bot bot commented Nov 14, 2024

@luacmartins @luacmartins 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]

@luacmartins luacmartins changed the title [HOLD for payment 2024-11-21] [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up Nov 14, 2024
@luacmartins luacmartins added Reviewing Has a PR in review and removed Awaiting Payment Auto-added when associated PR is deployed to production labels Nov 14, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 26, 2024
@melvin-bot melvin-bot bot changed the title [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up [HOLD for payment 2024-12-03] [Search v1.2] - Pay button can be clicked many times without error when bank account is not set up Nov 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

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

Copy link

melvin-bot bot commented Nov 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.66-8 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-12-03. 🎊

Copy link

melvin-bot bot commented Nov 26, 2024

@luacmartins @luacmartins 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]

@luacmartins
Copy link
Contributor

This is done

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. Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants