Граф коммитов

121 Коммитов

Автор SHA1 Сообщение Дата
Davey Alvarez d30b430ad5
Refactor cart polling logic 2024-11-20 18:52:00 -08:00
Reino Muhl 1b9d7fff86
feat(next): reduce bundle size
Because:

- The `payments-next` builds are taking very long and using many system
  resources.
- Under normal operation, the `payments-next` service in dev mode is
  using a lot of memory and at times running into its 7gb memory limit,
  causing a service restart.

This commit:

- Adds Next.js bundle analyzer to `payments-next`
- Adds additional packages to serverComponentsExternalPackages.
  - By default Nextjs automatically bundles dependencies used in Server
    Components and Route Handlers. As a result, all dependencies used in
    the NestApp were being bundled by Next.js, which bloated the Next.js
    nodejs bundle.
  - All dependencies used in the NestApp, should not be included in the
    Next.js bundle, and should therefore be added to
    `serverComponentsExternalPackages` going forward.
  - Dependencies that are potentially used by Next.js as part of server
    side rendering or hydration of pages should still be included in the
    Next.js bundle, and should not be added to
    `serverComponentsExternalPackages`.

Closes #FXA-10712
2024-11-19 17:08:39 -05:00
Reino Muhl 182c00b3c1
feat(next): add email, google, apple sign in
Because:

- On the checkout page, after populating the email clicking continue
  should navigate the user to the FxA signin page for signin.
- On the checkout page, when clicking Google/Apple button, it should
  start the third party auth via FxA.
- Completion of either signin option should navigate the user back to
  the checkout page in a signed in state.

This commit:

- Updated Auth.js provider to support email, google and apple login
- Customers are redirected to the '/new' page on successful login, which
  creates a new cart with the customers uid added.
- Updates Payments Next auth config to a non-public client.

Closes #FXA-10548
2024-11-14 16:58:25 -05:00
Reino Muhl 7da1197d19
Merge pull request #17927 from mozilla/fxa-10564-glean-enable-env-var
feat(payments-metrics): add glean enabled env var
2024-11-05 16:04:30 -05:00
Reino Muhl 914440bd7e
feat(payments-metrics): add glean enabled env var
Because:

- Need to be able to enable or disable glean recording of events.

This commit:

- Adds enabled value to payments metrics glean config
- Updates payments metrics glean manager to respect enabled config value

Closes #FXA-10564
2024-11-05 15:07:55 -05:00
Reino Muhl 912c24c282
feat(next): update cart payment info logic
Because:

- Update emitter and glean records with actual payment provider
- Add paypal payment provider logic to success page

This commit:

- Updates emitter calls to include payment provider
- Updates emitter event for a failure to allow for undefined payment
  provider
- Removes ConfirmationDetail component from success page and moves logic
  into page JSX.
- Adds card and paypal images

Closes #FXA-10503 FXA-10608
2024-10-31 11:59:37 -04:00
Reino Muhl 1a64d9078b
feat(next): use confirmation token in checkout
Because:

- Update Stripe checkout to use confirmation token instead of payment
  method while creating subscription and confirming the payment intent.

This commit:

- Updates the frontend to create a ConfirmationToken instead of payment
  method
- Updates Stripe Checkout to use ConfirmationToken
- Updates Stripe Checkout to confirm payment intent

Closes #FXA-7581
2024-10-23 12:30:08 -04:00
Lisa Chan 322fccaa0d
feat(payments-next): Component: SignedIn 2024-10-23 10:20:36 -04:00
Davey Alvarez 4c3a787aaa
Update success page 2024-10-22 12:10:57 -07:00
Lisa Chan 5bf120eb6d
Merge pull request #17846 from mozilla/FXA-7580
feat(payments-next): Sign-in/sign-up form
2024-10-18 14:31:13 -04:00
Lisa Chan 05906c16c8
feat(payments-next): Sign-in/sign-up form 2024-10-18 09:33:06 -04:00
Reino Muhl 4d57420dc7
Merge pull request #17845 from mozilla/fxa-7574-generic-loading-page
feat(next): add a generic loading page
2024-10-17 12:58:26 -04:00
Lisa Chan 2e4db7aabe
chore(payments-next): Remove storybook 2024-10-17 12:07:50 -04:00
Reino Muhl 851f229dee
feat(next): add a generic loading page
Because:

- Display a loading state to customers while navigating between pages.

This commit:

- Adds a `loading.tsx` to the root routes of the Next app

Closes #FXA-7574
2024-10-17 10:33:29 -04:00
Reino Muhl 7c76894296
fix(next): add default dev profile secret
Because:

- Checkout throws error due to invalid profile client secret

This commit:

- Adds default dev profile client secret.

Closes #
2024-10-15 17:05:46 -04:00
Davey Alvarez c9100171f2
Set up cart status polling 2024-10-11 15:25:45 -07:00
Lisa Chan c20c754e4e
feat(libs/payments): Implement customerChanged 2024-10-09 20:41:56 -04:00
Reino Muhl ef40a17022
fix(payments-ui): use actions ts alias
Because:

- Use the payments ui actions TS alias for all actions imports

This commit:

- Updates imports to make use of the payments ui actions TS alias

Closes #
2024-10-09 15:20:07 -04:00
Julian Poyourow a7127f14ec
Merge pull request #17788 from mozilla/FXA-10454
chore(shared-cms): strapi 5 upgrade
2024-10-08 12:38:12 -07:00
Reino Muhl e23da68baf
feat(payments-next): remaining p1 metrics
Because:

- payments-next should be be recording all P1 metrics.

This commit:

- Renames PaymentsGleanService to PaymentsEmitterService to more
  accurately indicate that this service will be used to handle all
  Emitter events.
- Restructure EmitterService to reuse common functionality.
- Restructure EmitterService to reuse common functionality.
- Renames recordGleanEvents to recordEmitterEvents to more accurately
  indicate that this action should be used to emit Emittery events on
  the server.
- Emit CheckoutView/Engage/Submit/Success/Error events from pages and
  components where necessary.
- Record the appropriate Glean event for each of the Emittery events.

Closes #FXA-10088
2024-10-07 16:22:46 -04:00
julianpoyourow b32169036f
chore(shared-cms): strapi 5 upgrade
Because:

- We want to use Strapi 5

This commit:

- Upgrades our queries and libraries to use Strapi 5

Closes FXA-10454
2024-10-07 18:19:58 +00:00
Davey Alvarez 71c6cecc2f
Sentry client respect metrics opt-out 2024-10-02 09:47:10 -07:00
Lisa Chan 6ff85bc44d
refactor(payments-next): Clean up styles 2024-09-27 12:32:04 -04:00
Davey Alvarez 32ce1f5496
Add support for subscription coupon via route param 2024-09-25 08:50:46 -07:00
Julian Poyourow 025f8caee2
Merge pull request #17668 from mozilla/FXA-7584
feat(payments-cart): add currency to cart
2024-09-24 11:59:54 -07:00
Lisa Chan 8d5ea056e1
feat(payments-next): Add button to show/hide product details when viewing page on mobile 2024-09-24 13:57:42 -04:00
julianpoyourow c90fbeb815
feat(payments-cart): add currency to cart
Because:

- We want to determine currency based on the tax address provided by the
  customer

This commit:

- Automatically determines the tax address and currency based on their
  IP address
- Allows user to update their tax address, thereby updating their
  currency

Closes FXA-7584
2024-09-24 17:13:06 +00:00
Lisa Chan ed2b733670
Merge pull request #17666 from mozilla/FXA-10439
feat(payments-next): Add information message to PurchaseDetails when a valid coupon is applied to cart
2024-09-24 09:15:49 -04:00
Lisa Chan 5b52b3ebe7
feat(payments-next): Add info message under Product Details when valid coupon is added to cart 2024-09-23 18:06:11 -04:00
Valerie Pomerleau 3796159aac
feat(settings): Update AccountRecoveryConfirmKey to new design with hint
Because:

* We are updating the design of the AccountRecoveryConfirmKey page
* We want to show the storage hint that users have had the option of saving

This commit:

* Update AccountRecoveryConfirmKey page content, l10n, stories, test

Closes #FXA-7894
2024-09-23 14:00:09 -07:00
Davey Alvarez f158ad56d8
Merge pull request #17648 from mozilla/FXA-8295-Add-next-version-endpoint
feat(next): add __version__ route for next app
2024-09-23 08:32:08 -07:00
Davey Alvarez b0fb42cb04
create version route for next app 2024-09-20 16:05:27 -07:00
Davey Alvarez f946bdf12f
Set up error boundary for cart checkout flow 2024-09-20 16:01:05 -07:00
Reino Muhl fdd532a716
Merge pull request #17627 from mozilla/fxa-10087-next-glean-view
feat(next): glean emit view event
2024-09-20 12:28:16 -04:00
Lauren Zugai 7e12934c39
feat(recovery-key): Make inline recovery key flow functional + navigate desktop Sync signins
Because:
* We want to encourage Sync signin users to create an account recovery key

This commit:
* Moves and refactors part of FlowRecoveryKeyHint into new component for sharing
* Sets ups the create recovery key and hint handlers in container component, call where needed
* Queries if recovery key exists after signin if sync, stores PW-related data into sensitiveDataClient
* Navigates signing in desktop Sync flow users without a recovery key to this new flow before taking them to CAD, if the feature flag is on

closes FXA-10079
2024-09-20 10:36:56 -05:00
Reino Muhl 7dd569d383
feat(next): glean emit view event
Because:

- Record SubPlat P1 metric view event using glean

This commit:

- Adds payments-metrics library
- Adds PaymentsGleanManager to format events data and CMS data into the
  required format for Glean events recording.
- Adds PaymentsGleanService to handle metrics events emitted by Next.js
- Adds the manager and service to the NestApp
- Adds new config values to payments-next for Glean reporting
- Emit view event from Checkout start page

Closes #FXA-10087
2024-09-19 15:38:27 -04:00
Reino Muhl 66023d562f
fix(next): resolve package import version warnings
Because:

- Importing package.json in sentry config files resulted in build
  warning 'Should not import the named export'

This commit:

- Add package version as env var added to js bundle by nextjs

Closes #
2024-09-12 09:19:40 -04:00
Lisa Chan c33d786bc6
Merge pull request #17334 from mozilla/FXA-7579
fix(libs): Add Coupon component
2024-09-11 12:38:53 -04:00
Lisa Chan e66d0a6042
feat(apps/libs): Add CouponForm Component 2024-09-11 11:57:51 -04:00
Vijay Budhram 318cfca9ac
feat(banner): Add Notification Promotion banner component 2024-09-11 09:44:47 -04:00
Reino Muhl 54fefd2872
feat(next): add sentry to payments-next
Because:

- Be able to use Sentry in Next.js on both the client and the server

This commit:

- Add Sentry to payments-next using the installation wizard

Closes #FXA-9998
2024-09-09 13:21:21 -04:00
Reino Muhl 3ac75baec1
Merge pull request #17497 from mozilla/fxa-10086-glean-yaml
feat(next): add subplat glean server yaml
2024-09-04 14:51:42 -04:00
Reino Muhl d5526d8b05
feat(next): add subplat glean server yaml
Because:

- Define glean events and metrics for subplat backend events

This commit:

- Adds metrics and events to subplat backend metrics yaml

Closes #FXA-10086
2024-09-04 14:05:01 -04:00
Reino Muhl 1c50ec8870
feat(next): add paypal sdk
Because:

- Initialize PayPal SDK and add button to checkout page

This commit:

- Adds PayPal SDK and initializes provider
- Adds PayPal button and only display when PayPal is selected in Payment
  Element
- Updates CSP for PayPal URLs
- Adds config options

Closes #FXA-7585
2024-08-29 12:19:07 -04:00
Lisa Chan 79f0f04727
fix(libs): Revise file structure for client and server components 2024-08-27 13:38:26 -04:00
Reino Muhl e15e7e718b
feat(next): add glean-generate script
Because:

- Have project target to generate glean code.

This commit:

- Adds glean metrics library.
- Adds blank subplat-backend-metrics.yaml
- Add glean-generate target to project.

Closes #FXA-9996
2024-08-09 15:05:16 -04:00
Reino Muhl a4003c3e6e
feat(payments-next): add processing page
Because:

- After subscribe now button is pressed or paypal payment is completed
  the customer should be navigated to a processing page.

This commit:

- Adds the processing page.
- Adds a Loading Spinner for payments-next

Closes #FXA-7577
2024-08-08 16:26:00 -04:00
Reino Muhl b0d25576db
Merge pull request #17247 from mozilla/fxa-9797-cleanup-contentful-band-aids
feat(cms): cleanup contentful cms band aids
2024-07-26 17:13:04 -04:00
Reino Muhl d267d6eecf
feat(next): check payments-next starts up
Because:

- Payments Next errors on startup do not cause a stack startup error,
  and instead fails silently.

This commit:

- Adds a check to the heartbeat route to check that Payments Next starts
  up correctly

Closes #FXA-10113
2024-07-26 12:58:05 -04:00
Reino Muhl c428a61a49
feat(cms): cleanup contentful cms band aids
Because:

- Some temporary band aids were added to support out of date Contentful
  data that could no longer be changed, due to the Contentful instance
  being changed to read-only.

This commit:

- Removes temporary band aids now that support for Strapi has been added

Closes #FXA-9797
2024-07-26 12:37:49 -04:00