Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Checkout: Implement billing and payment method data persistence to cart store #1940

Closed
nerrad opened this issue Mar 11, 2020 · 0 comments · Fixed by #2002
Closed

Checkout: Implement billing and payment method data persistence to cart store #1940

nerrad opened this issue Mar 11, 2020 · 0 comments · Fixed by #2002
Assignees
Labels
type: enhancement The issue is a request for an enhancement.
Milestone

Comments

@nerrad
Copy link
Contributor

nerrad commented Mar 11, 2020

Currently, the useBillingData hook is available for extracting billing specific data and setting that on the PaymentMethodData context. This in turn should probably persist to the cart store so that when checkout processing is kicked off, it can get all that it needs from the cart store.

A rough outline of tasks:

  • Rework what needs reworked in PaymentMethodDataContext so that billing data is either persisted to it's local store and/or the cart store and exposed on the useBillingData hook (including setting billing data).
  • Account for when the use same address for billing checkbox is checked so changes to shipping address are replicated to the billing data state.
  • Email address will need included with billing data.
  • payment method data is something provided by payment methods action dispatches (see setPaymentStatus.success and setPaymentStatus.fail actions. It is arbitrary data that is passed through to the server on the checkout processing event and then payment methods hook in server side to pick up that passed through data to finish processing along with the checkout processing. Note: this is pretty much how things happen in the current checkout in terms of data transfer shape from client to server. So the work needed here will be ensuring that paymentMethodData is added to the cart store so that checkout context can pick that up (via a usePaymentMethodData hook?) for including in the checkout processing request.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement The issue is a request for an enhancement.
Projects
None yet
2 participants