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

[$1000] Web - Can pay IOU with PayPal even if the recipient has no PayPal payment method #23861

Closed
6 tasks
kbecciv opened this issue Jul 29, 2023 · 25 comments
Closed
6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Jul 29, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Precondition: User A must not have a PayPal paypal method set.

  1. On User A, make a money request to User B
  2. On User B, observe that the PayPal payment method is available for paying this request
  3. On User B, pay the request via PayPal
  4. On User B, observe that the PayPal URL is incorrect

Expected Result:

The PayPal payment method should not be available.

Actual Result:

The PayPal payment method is available.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.46-1
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
Notes/Photos/Videos: Any additional supporting documentation

paypal-iou-bug.mp4
Recording.3994.mp4

Expensify/Expensify Issue URL:
Issue reported by: @samh-nl
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690565339451529

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018a86abe5b75ae6ce
  • Upwork Job ID: 1691095540333400064
  • Last Price Increase: 2023-08-21
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 29, 2023

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 29, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@kbecciv
Copy link
Author

kbecciv commented Jul 29, 2023

Proposal by: @samh-nl
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690565339451529

Proposal

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

Can pay IOU with PayPal even if the recipient has no PayPal payment method

What is the root cause of that problem?

This affects two usages of the SettlementButton component.

  1. MoneyReportHeader: The shouldShowPayPal prop is used to determine whether Paypal is a valid payment method. However, we are checking whether the sender has a PayPal.me account configured instead of the recipient.

    const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'payPalMeAddress']));

  2. ReportPreview: We don't show a payment options list, instead the last used payment method is taken as default.

    let paymentMethod = this.props.nvp_lastPaymentMethod[this.props.policyID] || '';

But in the case that this is PayPal, we don't check if the recipient actually has it configured:

// In case the last payment method has been PayPal, but this request is made in currency unsupported by Paypal, default to Elsewhere
if (paymentMethod === CONST.IOU.PAYMENT_TYPE.PAYPAL_ME && !_.includes(CONST.PAYPAL_SUPPORTED_CURRENCIES, this.props.currency)) {
paymentMethod = CONST.IOU.PAYMENT_TYPE.ELSEWHERE;
}

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

  1. We should check whether the recipient has a PayPal.me account configured in MoneyReportHeader:
const shouldShowPaypal = Boolean(moneyRequestReport.submitterPayPalMeAddress);
  1. In ReportPreview, we should also define and pass the shouldShowPaypal prop to the SettlementButton. Consequently, we should add a condition to the if-statement to ensure shouldShowPaypal is true, so that otherwise the fallback to the payment method 'elsewhere' is used.

To reduce code duplicity in declaring shouldShowPaypal, we can add a util function in IOUUtils.

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

@muttmuure Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

@muttmuure Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@muttmuure
Copy link
Contributor

I don't think this is a bug. You should be able to pay anyone with PayPal

@melvin-bot melvin-bot bot removed the Overdue label Aug 9, 2023
@samh-nl
Copy link
Contributor

samh-nl commented Aug 9, 2023

If the recipient has no PayPal.me username provided, it goes to the wrong person. It uses the money amount as the username, please see the video.

@samh-nl
Copy link
Contributor

samh-nl commented Aug 12, 2023

Thoughts?

@muttmuure muttmuure reopened this Aug 14, 2023
@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Aug 14, 2023
@melvin-bot melvin-bot bot changed the title Web - Can pay IOU with PayPal even if the recipient has no PayPal payment method [$1000] Web - Can pay IOU with PayPal even if the recipient has no PayPal payment method Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Current assignee @muttmuure is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@ArekChr
Copy link
Contributor

ArekChr commented Aug 22, 2023

Confirming that bug exists. NewDot redirects to www.paypal.com/paypalme/{amount}{currency}. This is a significant bug with potential security implications, as it could result in funds being sent to the wrong individual.

Here is an example: https://www.paypal.com/paypalme/12PLN

@muttmuure I'm in favour of removing the option if the recipient doesn't have a PayPal payment method.
any thoughts/ideas?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

@ArekChr, @muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@samh-nl
Copy link
Contributor

samh-nl commented Aug 25, 2023

Bump

@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2023

@ArekChr @muttmuure this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Aug 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2023

Current assignee @ArekChr is eligible for the Internal assigner, not assigning anyone new.

@muttmuure
Copy link
Contributor

I don't think we should remove the option, we want to encourage users to add their PayPal account

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Aug 29, 2023

@muttmuure, Where NewDot should redirect if user 'A' presses pay with PayPal to user 'B' in case user 'B' doesn't have a PayPal account? Right now it redirects to the wrong person.

@melvin-bot melvin-bot bot added the Overdue label Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

@ArekChr, @muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!

@muttmuure
Copy link
Contributor

Yeah, actually, I can see what you mean.

Let's remove it if user B doesn't have one

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 1, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Sep 4, 2023

Great! @samh-nl, your proposal looks good to me then.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@sophiepintoraetz
Copy link
Contributor

We are deprecating paypal (decision here, GH here) so closing this out, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

6 participants