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

Incorect subscription details displayed in the payment page for Guardian VPN #2787

Closed
madalincm opened this issue Oct 8, 2019 · 17 comments

Comments

@madalincm
Copy link

commented Oct 8, 2019

Affected versions:

  • Firefox Release 69.0.1
  • Firefox Beta 70.0b9
  • Firefox Nightly 71.0a1

Affected Platforms:

  • Windows 10 (64-bit)
  • MacOS 10.14.5
  • Linux Ubuntu 16.04 (64-bit)

Precondition

User is logged in in the Guardian VPN homepage and he does not have an active subscription.
https://stage.guardian.nonprod.cloudops.mozgcp.net/vpn

Steps to reproduce

  1. Click on the "Subscribe for just $9.99/mo" blue button
  2. Observe the wording that describes the current subscription and the amount that the user will be charged

Expected result:

  • In the payments page it is mentioned that this is a monthly subscription
  • The displayed amount is the same that was displayed in Guardian VPN website (9.99/mo)

Actual result:

  • the following description is displayed: "Firefox Guardian (Daily) for $1.00 per day"
  • The user is asked for authorization to be billed 1$ per day

incorrectSubscription

@lmorchard

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

I think this was a special version of the product we created just for testing a shorter subscription duration? Though, if this is displaying for the normal Guardian product link, we maybe changed the wrong product?

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

Is the lead page not including the plan_id in the URL?

@lmorchard

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

TL;DR: We should completely specify product & plan in the link on the Guardian site by adding ?plan=plan_FiJ55YK6UYftPa:

https://accounts.stage.mozaws.net/subscriptions/products/prod_FiJ42WCzZNRSbS?plan=plan_FiJ55YK6UYftPa

Taking a deeper look at this, I think I see what the issue is: We're linking to the product ID without selecting a plan ID. If the product has just one plan, that's fine. But, if the product has multiple plans, and no plan is specified in a ?plan query param - then the payment page defaults to the first one it sees in the list of plans.

To link specifically to the monthly plan for this product, we need to use this URL that specifies the product ID in the path and the plan ID in a query param:

https://accounts.stage.mozaws.net/subscriptions/products/prod_FiJ42WCzZNRSbS?plan=plan_FiJ55YK6UYftPa

Here's what the payment server is seeing as a list of plans - notice that the $1 daily plan comes up first:

[
  {
    "amount": 100,
    "currency": "usd",
    "interval": "day",
    "plan_id": "plan_FvPMH5lVx1vhV0",
    "plan_name": "Firefox Guardian (Daily)",
    "product_id": "prod_FiJ42WCzZNRSbS",
    "product_name": "Firefox Guardian"
  },
  {
    "amount": 999,
    "currency": "usd",
    "interval": "month",
    "plan_id": "plan_FnzpQPkfb7e1mr",
    "plan_name": "Firefox Private Network (Monthly)",
    "product_id": "prod_Fnzoovl5zlg0Zd",
    "product_name": "Firefox Private Network"
  },
  {
    "amount": 999,
    "currency": "usd",
    "interval": "month",
    "plan_id": "plan_FiJ55YK6UYftPa",
    "plan_name": "Firefox Guardian (Monthly)",
    "product_id": "prod_FiJ42WCzZNRSbS",
    "product_name": "Firefox Guardian"
  },
  {
    "amount": 500,
    "currency": "usd",
    "interval": "month",
    "plan_id": "plan_FfiupsKXZ3mMZ6",
    "plan_name": "123Done Pro (Monthly)",
    "product_id": "prod_FfiuDs9u11ESbD",
    "product_name": "123done Pro"
  },
  {
    "amount": 5000,
    "currency": "usd",
    "interval": "month",
    "plan_id": "plan_FaoUCTvZ6TLN5A",
    "plan_name": "Firefox Avenger (Monthly)",
    "product_id": "prod_FaoUiGcVfoGaLA",
    "product_name": "Firefox Avenger"
  },
  {
    "amount": 500,
    "currency": "usd",
    "interval": "month",
    "plan_id": "plan_FUUOYlhpIhWtoo",
    "plan_name": "Firefox Fortress (Monthly)",
    "product_id": "prod_FUUNYnlDso7FeB",
    "product_name": "Firefox Fortress"
  }
]
@clouserw

This comment has been minimized.

Copy link
Member

commented Oct 9, 2019

I think we've agreed on a URL on Slack, but @bbangert mentioned he saw a bug. Is that a blocker? Should it be tied to this Issue or a different one?

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 10, 2019

There was no bug, I was using the wrong URL. I think we can close this.

@bbangert bbangert closed this Oct 10, 2019
@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 10, 2019

Note, the fix is that the lead page must include a plan_id.

@madalincm

This comment has been minimized.

Copy link
Author

commented Oct 11, 2019

I have checked this again in stage but I'm seeing the exact same behavior.
The subscribe button is still linking to https://stage.guardian.nonprod.cloudops.mozgcp.net/r/vpn/subscribe, it does not include a plan id as a query parameter, so it opens the 1$ plan which is the first one in the list.

From my understanding the fix should be that we include the plan_id which is not currently happening so I'm reopening this issue.

@madalincm madalincm reopened this Oct 11, 2019
@lmorchard

This comment has been minimized.

Copy link
Member

commented Oct 11, 2019

We closed the issue because the fix is not on the FxA side of things, so we can't fix it on our team

@madalincm

This comment has been minimized.

Copy link
Author

commented Oct 14, 2019

@lmorchard should I open an issue on the guardian website repo or where should this issue be best placed?

@clouserw

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

I think we can call it fixed. @rlr did you push those new URLs out?

@rlr

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Yep, URLs are in... But I found another issue in the URL that I'll file now.

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Just a note, my prior comment was incorrect, it should be ?plan=, not plan_id. This was discussed on Slack, just making sure its reflected here.

@clouserw

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Ok, I'm closing this based on that comment. Sorry for the confusion @madalincm

@clouserw clouserw closed this Oct 14, 2019
@rlr

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Actually, according to comment above, plan_FiJ55YK6UYftPa should be monthly. But I am seeing the information for daily:

Screen Shot 2019-10-14 at 11 54 38 AM

@rlr

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

^ And maybe that is because of issue #2883 ?

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Is it valid to have two ? in the URL? If that's not valid, its possible our URL parsing libraries aren't going to be able to handle it either.

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 14, 2019

Just double-checked, two ? in the URL are invalid, the URL needs to be fixed in our redirects per #2883.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.