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

Owner transfer - Nothing happens after clicking on the Accept terms & add payment #50050

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 2, 2024 · 8 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 2, 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.43-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: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Issue found when executing PR #49411

Action Performed:

  1. Create a workspace as a gmail user
  2. Add a user and make him an admin
  3. Login as a new admin and make Transfer ownership
  4. Fill out payment card form and make sure the currency is GBP.
    Applause QA ND Card Tests
    4555 9400 0559 7305
    ccv: 458
    07/2028

Click "Accept terms & add payment card"
5. In the network tab we should see 1 call to AddPaymentCardGBP and a new iframe modal should pop up with Stripe's 3DS verification screen.
Click "complete"
6. In the network tab there should be 1 call to a new api command called verifySetupIntentAndRequestPolicyOwnerChange, the iframe modal should close, and the right-pane UI should change to the UI that says "Take over annual subscription".
7. Click "Transfer subscription" button
In the network tab should see 1 new call to RequestWorkspaceOwnerChange and should see success screen that says "Woohoo! All set."

Expected Result:

In the network tab we should see 1 call to AddPaymentCardGBP and a new iframe modal should pop up with Stripe's 3DS verification screen.
Click "complete"

Actual Result:

Nothing happens after clicking on the Accept terms & add payment
It's possible to go bock and Transfer again with successfull result

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

Add any screenshot/video evidence

Bug6621665_1727823961444.Screen_Recording_2024-10-02_at_01.58.27.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

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

@lanitochka17
Copy link
Author

@mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@Nodebrute
Copy link
Contributor

Nodebrute commented Oct 2, 2024

Edited by proposal-police: This proposal was edited at 2024-10-02 11:55:52 UTC.

Proposal

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

Nothing happens after clicking on the Accept terms & add payment

What is the root cause of that problem?

If the currency is GBP we don't call ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE cause it's in the else block

const params: AddBillingCardAndRequestWorkspaceOwnerChangeParams = {
policyID,
cardNumber,
cardYear,
cardMonth,
cardCVV,
addressName,
addressZip,
currency,
};
// eslint-disable-next-line rulesdir/no-multiple-api-calls
API.write(WRITE_COMMANDS.ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE, params, {optimisticData, successData, failureData});

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

We can remove the else block from here and we should always call ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE

if (currency === CONST.PAYMENT_CARD_CURRENCY.GBP) {
        const params: AddPaymentCardParams = {
            cardNumber,
            cardYear,
            cardMonth,
            cardCVV,
            addressName,
            addressZip,
            currency,
            isP2PDebitCard: false,
        };
        PaymentMethods.addPaymentCardGBP(params);
    } 
        const params: AddBillingCardAndRequestWorkspaceOwnerChangeParams = {
            policyID,
            cardNumber,
            cardYear,
            cardMonth,
            cardCVV,
            addressName,
            addressZip,
            currency,
        };
        // eslint-disable-next-line rulesdir/no-multiple-api-calls
        API.write(WRITE_COMMANDS.ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE, params, {optimisticData, successData, failureData});

What alternative solutions did you explore? (Optional)

If we want to keep the else block we can call again after this

  API.write(WRITE_COMMANDS.ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE, params, {optimisticData, successData, failureData})

@DylanDylann
Copy link
Contributor

@blimpich It seems we are waiting for something from BE, right?

@blimpich
Copy link
Contributor

blimpich commented Oct 2, 2024

Will look into this, I have limited time today before going on vacation but my initial thought is that this shouldn't be possible to QA because applause doesn't have a card that requires SCA authentication, at least I'm pretty sure we don't. I will look at reproducing this.

@blimpich
Copy link
Contributor

blimpich commented Oct 2, 2024

@Nodebrute I 👎 your proposal because it won't work. Cards using GBP need to be treated differently for legal reasons. The ADD_BILLING_CARD_AND_REQUEST_WORKSPACE_OWNER_CHANGE endpoint does not do the necessary authentication steps needed to meet European regulation requirements. Please look at the PRs that added that code and get context if you'd like to learn more 🙂

@blimpich
Copy link
Contributor

blimpich commented Oct 2, 2024

I don't think this is an issue. At least not one worth solving right now. The reason why that card didn't work is because the test card is an American USD card so Stripe didn't pass back an authentication link. The frontend expected an authentication link onyx key but it didn't get one, so it looks like nothing happened. That's not great, but the reality is that this is a very niche problem where the user puts in GBP as their selected currency when really it should be USD.

99.99% of people who put in a card and explicitly click "GBP" as their currency probably have a credit card that actually is issued in GBP, so this will still work for them. If this issue comes up again because users are actually putting in the wrong currency selection in this form we can look into investing in a fix.

Thank you @DylanDylann for pinging me and bringing this issue to my attention 🙏

@blimpich blimpich closed this as completed Oct 2, 2024
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
Projects
None yet
Development

No branches or pull requests

5 participants