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

Do not let users add multiple paypal.me logins #3960

Closed
5 tasks done
kevinksullivan opened this issue Jul 9, 2021 · 11 comments · Fixed by #4034
Closed
5 tasks done

Do not let users add multiple paypal.me logins #3960

kevinksullivan opened this issue Jul 9, 2021 · 11 comments · Fixed by #4034
Assignees
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kevinksullivan
Copy link
Contributor

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


Action Performed:

Context in this PR comment. A user can add multiple paypal.me usernames to their account.

  1. Add paypal.me login
  2. Navigate to settings/payments
  3. Click on "Add new payment method"
  4. Click on PayPal.me
  5. Add a Paypal.me account and save
  6. Click on add new Payment method again
  7. See paypal.me and be able to add another paypal.me login

Expected Result:

A user should not be able to add multiple paypal.me logins. More specifically, the flow should work as follows:

  1. User adds Paypal.me login.
  2. Once paypal.me is added, it is shown in the payment method list
  3. A user can tap the existing paypal.me user name to edit it
  4. Add Payment Method no longer shows paypal.me as an option so long as one exists for the user

Actual Result:

Describe what actually happened

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Version Number: has not deployed yet
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

124942623-16b32280-e00c-11eb-92aa-eadb22027a98.mp4

View all open jobs on Upwork

@kevinksullivan
Copy link
Contributor Author

@roryabraham holding off on the auto assigner until we know whether the original PR is adding multiple paypal.me usernames or just overriding the existing user name

@roryabraham
Copy link
Contributor

From my testing, it seems like the "second" Paypal.me account that can be "added" will replace the old one.

@roryabraham roryabraham added the External Added to denote the issue can be worked on by a contributor label Jul 9, 2021
@MelvinBot
Copy link

Triggered auto assignment to @JmillsExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MelvinBot MelvinBot added the Daily KSv2 label Jul 9, 2021
@tugbadogan
Copy link
Contributor

Hi, I see this issue has External tag, I would like to work on this issue. Here is my proposal:

  • I will add payPalMeUsername prop to PaymentsPage module and load it from Onyx like this:

https://github.com/Expensify/Expensify.cash/blob/039b671cc6683372317327fde6dc4f9ecb78818b/src/pages/settings/Payments/PaymentMethodList.js#L169-L171

  • I will use this prop to show/hide Paypal.me menu item here:

https://github.com/Expensify/Expensify.cash/blob/039b671cc6683372317327fde6dc4f9ecb78818b/src/pages/settings/Payments/PaymentsPage.js#L107-L111

Do you want to hide Add Payment Method button if there isn't any available menu item? It doesn't look good right now when we hide Paypal.me menu item now.

  • To edit existing Paypal.me account addPaymentMethodTypePressed function will be called here to open Paypal.me account settings page:

https://github.com/Expensify/Expensify.cash/blob/039b671cc6683372317327fde6dc4f9ecb78818b/src/pages/settings/Payments/PaymentsPage.js#L50-L52

https://github.com/Expensify/Expensify.cash/blob/039b671cc6683372317327fde6dc4f9ecb78818b/src/pages/settings/Payments/PaymentsPage.js#L69-L75

@tugbadogan
Copy link
Contributor

By the way, there's a bug in getUserDetails function and it puts an empty string to ONYXKEYS.NVP_PAYPAL_ME_ADDRESS since that API call doesn't return a Paypal.me account name.

https://github.com/Expensify/Expensify.cash/blob/039b671cc6683372317327fde6dc4f9ecb78818b/src/libs/actions/User.js#L64-L82

@roryabraham
Copy link
Contributor

Do you want to hide Add Payment Method button if there isn't any available menu item?

Yes 👍

By the way, there's a bug in getUserDetails function and it puts an empty string to ONYXKEYS.NVP_PAYPAL_ME_ADDRESS since that API call doesn't return a Paypal.me account name.

Thanks for reporting! It seems like we might need to fix this internally to fix the API. I will investigate and let you know.

But overall @tugbadogan your proposal looks good! Feel free to submit a PR once an Upwork job has been created and you've been hired on Upwork.

@kevinksullivan
Copy link
Contributor Author

Picked this one up for Mills. Job is posted here!

@roryabraham
Copy link
Contributor

@tugbadogan The Upwork job is ready for you to apply 👍

@tugbadogan
Copy link
Contributor

Thanks @kevinksullivan @roryabraham I applied via Upwork. I will send the PR soon.

@tugbadogan
Copy link
Contributor

Thanks for merging the PR and closing the issue 👍 I am still waiting for the offer on Upwork by the way. cc @kevinksullivan

@kevinksullivan
Copy link
Contributor Author

Hired! Waiting till all relevant PRs have been merged for 7 days, then will make the payment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants