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

Hide add payment button #4034

Merged

Conversation

tugbadogan
Copy link
Contributor

cc @roryabraham @kevinksullivan

Details

Add Payment Method no longer shows paypal.me option if there's an existing Paypal.me username and Add Payment Method button is hidden completely if there is no available payment method to add.

Fixed Issues

Fixes #3960

Tests

Tested by adding and updating Paypal.me username on different platforms.

QA Steps

  • Navigate to settings/payments
  • Click on "Add new payment method"
  • Click on PayPal.me
  • Add a Paypal.me account and save
  • Go back to Payment Method List
  • Make sure "Add new payment method" button is hidden
  • Click and edit existing Paypal.me username

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screen.Recording.2021-07-14.at.14.16.25-2.mov

Mobile Web

Screen.Recording.2021-07-14.at.14.18.51.mov

Desktop

Screen.Recording.2021-07-14.at.14.24.40-2.mov

iOS

Screen.Recording.2021-07-14.at.15.27.35.mov

Android

Screen.Recording.2021-07-14.at.15.05.32.mov

Hide Paypal.me button if there is a Paypal.me username.
Hide Add Payment Method button if there is no available payment method.
@tugbadogan tugbadogan requested a review from a team as a code owner July 14, 2021 14:30
@MelvinBot MelvinBot requested review from roryabraham and removed request for a team July 14, 2021 14:30
@tugbadogan
Copy link
Contributor Author

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually @tugbadogan I was wrong - no API changes are needed. The bug in getUserDetails is front-end only. Make the following change to the API call in there and it will work:

API.Get({
        returnValueList: 'account, loginList, nameValuePairs',
        nvpNames: [CONST.NVP.BLOCKED_FROM_CONCIERGE, CONST.NVP.PAYPAL_ME_ADDRESS].join(','),
    })

src/pages/settings/Payments/PaymentsPage.js Show resolved Hide resolved
@roryabraham
Copy link
Contributor

Otherwise, the code looks great! Let's get this easy bug fix added to the PR then this should be good-to-go. Thanks and great work!

@tugbadogan
Copy link
Contributor Author

@roryabraham Thanks for the review. I fixed the API call in getUserDetails function. Now it works without any problem.

@roryabraham roryabraham merged commit 2c323e7 into Expensify:main Jul 15, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.78-3🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.79-4🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not let users add multiple paypal.me logins
3 participants