Because:
* Use Next.js standard environment variable procedure
* Provide typed config to be used throughout Payments Next.
This commit:
* Refactor config to use Next.js native environment loaders
* Remove .env.json and .env.production.json
* Add validator and transformer functions to provide
validated and typesafe config.
Closes #FXA-9436
Because:
* Cart needs eligibility status of current cart.
This commit:
* Add new field, eligibilityStatus, to cart db as Enum
* Add CartEligibilityStatus enum to kysely types
Closes #FXA-9472
Because:
* Need a server action to handle errors returned from Stripe elements
submit function.
This commit:
* Creates handleStripeError action and related Nextjs Action Service
* Adds checkoutErrorCart to Cart Service
* Add cart.utils
* Add tests for cart.utils and checkoutErrorCart
Closes #FXA-8851
Because:
- Accounts were not being fully deleted
- Since do not use a keyfile, the check on whether or not the queue was enabled did not pass, and the explicit check to run in stage/prod was lost in the refactor
This commit:
- Removes the queueEnabled flag check entirely. (Now that a local emulator is present we can assume the queue should always be available.)
- Adds back in the `fallback` option to the CloudTasksClient, which indicates the client should use https instead of grcp, which has proven to be a more reliable setting.
Because:
* Call CartService.setupCart from payments-next via server action.
This commit:
* Extracts fxa-geodb into libs/* library
* Updates CartService to include GeodbManager
* Call setupCart from payments-next
Closes #FXA-8892
Because:
* Want to use Next.js instrumentation featuer to start NestApp on
Next.js server startup.
This commit:
* Upgrades Next.js to version 14.2 which includes intrumentation fixes.
* Adds instrumentation logic.
Closes #
Co-authored-by: Ben Bangert <100193+bbangert@users.noreply.github.com>
Because:
* We need validation for the input to our actions. We also use
class-validator and class-transformer elsewhere, and although I'm not
the most fond of this syntax/setup vs something like zod, we don't
have zod as a dependency at the moment.
This commit:
* Adds class-validator and class-transformer as well as validations for
each for the getCart and updateCart actions
Because:
* We need a server action to be able to update the cart details
This commit:
* Adds a server action to be able to update the cart details
Closes FXA-8900
Because:
* On cart setup, add stripe customer id, if it exists, to the cart.
This commit:
* Adds method to AccountCustomerManager to get stripe customer id or
return null.
* Adds AccountCustomerManager to CartService and fetches stripe customer
id.
* Splits unit and integration tests for the payments-cart library
Closes #FXA-8898
Because:
* Ensure all localization strings can be localized in React Server
Components.
This commit:
* Removes LocalizerServer
* Adds LocalizerRSC to serve as a wrapper for ReactLocalization that can
be used by React Server Components, as well as a few other utility
methods.
* Adds LocalizerRscFactory that instantiates LocalizerRSC only with
bundles for a provided acceptLanguage string.
* Adds LocalizerRscFactoryProvider to be used with the NestApp to
instantiate and then intialize the LocalizerRscFactory. Initalization
will fetch all messages from disk and populate the bundles.
* Reorganize shared/l10n library to match Node style guide
* Removes demo l10n code
* Update purchase-details, terms-and-service components, and success and
error pages to use new LocalizerRSC class for localization.
* Adds temporary l10n-convert script to provide translation for existing
ftl strings.
Closes #FXA-8822
Because:
* Our naming in our client needlessly renamed Stripe methods making it a
little harder to understand what is going on
This commit:
* Updates our naming to match what Stripe has, so that it's easier to
look stuff up.
Closes FXA-9019
Because:
* We need to be able to fetch upcoming invoices via the typed Stripe
client
This commit:
* Adds retrieveUpcomingInvoice to the typed Stripe client
Closes FXA-8895
Because:
* Need a Localizer implementation that can be used in a react client
component.
This commit:
* Creates LocalizerClient which instantiates an instance of
ReactLocalization to be used by the LocalizationProvider.
Closes #
Because:
- We want to use the `cloud-tasks` nx lib that introduced last sprint
This commit
- Updates account end points to use the nx lib
- Updates CI to include cloud-task emulator
(cherry picked from commit 7c0c70d2a4)
Because:
- We want to use the `cloud-tasks` nx lib that introduced last sprint
This commit
- Updates account end points to use the nx lib
- Updates CI to include cloud-task emulator
Because:
* Part of M3a.
* We want `addTaxIdToCustomer` added to StripeManager.
This commit:
* Adds aforementioned method to `StripeManager` using existing implementation for reference.
* Updates customer metadata with `taxId` when customer `taxId` does not match incoming `taxId`.
Closes FXA-8944
Because:
* Create a localizer class that can be used by payments next react
server components.
* Only generate fluent bundles once on startup.
This commit:
* Moves logic from Localizer class, defined in
`fxa-auth-server/lib/l10n/index.ts`, to a LocalizerBase class.
* Adds LocalizerServer class to be used by payments next.
* Moves nestapp from payments-next app to a library
Closes #FXA-8821