This commit is contained in:
Darren Ethier 2020-04-17 11:42:51 -04:00
parent 0a98037606
commit ae3a2dc7ad
3 changed files with 29 additions and 31 deletions

View File

@ -1,8 +1,8 @@
# Checkout Block API overview
# Checkout Block API overview <!-- omit in toc -->
This document gives an overview of some of the major architectural components/APIs for the checkout block. If you haven't already, you may also want to read about the [Checkout Flow and Events](../../extensibility/checkout-flow-and-events.md).
**Table of Contents**
## Table of Contents <!-- omit in toc -->
- [Checkout Block API overview](#checkout-block-api-overview)
- [Contexts](#contexts)
- [Notices Context](#notices-context)

View File

@ -1,25 +1,24 @@
# Checkout Block Flow
# Checkout Block Flow <!-- omit in toc -->
This document gives an overview of the flow for the checkout in the WooCommerce checkout block, and some general architectural overviews.
**Table of Contents**
## Table of Contents <!-- omit in toc -->
- [Checkout Block Flow](#checkout-block-flow)
- [General Concepts](#general-concepts)
- [Tracking flow through status](#tracking-flow-through-status)
- [`CheckoutProvider` Exposed Statuses](#checkoutprovider-exposed-statuses)
- [Special States:](#special-states)
- [`ShippingProvider` Exposed Statuses](#shippingprovider-exposed-statuses)
- [`PaymentMethodDataProvider` Exposed Statuses](#paymentmethoddataprovider-exposed-statuses)
- [Emitting Events](#emitting-events)
- [`onCheckoutBeforeProcessing`](#oncheckoutbeforeprocessing)
- [`onPaymentProcessing`](#onpaymentprocessing)
- [`onCheckoutAfterProcessingWithSuccess`](#oncheckoutafterprocessingwithsuccess)
- [`onCheckoutAfterProcessingWithError`](#oncheckoutafterprocessingwitherror)
- [`onShippingRateSuccess`](#onshippingratesuccess)
- [`onShippingRateFail`](#onshippingratefail)
- [`onShippingRateSelectSuccess`](#onshippingrateselectsuccess)
- [`onShippingRateSelectFail`](#onshippingrateselectfail)
- [General Concepts](#general-concepts)
- [Tracking flow through status](#tracking-flow-through-status)
- [`CheckoutProvider` Exposed Statuses](#checkoutprovider-exposed-statuses)
- [Special States:](#special-states)
- [`ShippingProvider` Exposed Statuses](#shippingprovider-exposed-statuses)
- [`PaymentMethodDataProvider` Exposed Statuses](#paymentmethoddataprovider-exposed-statuses)
- [Emitting Events](#emitting-events)
- [`onCheckoutBeforeProcessing`](#oncheckoutbeforeprocessing)
- [`onPaymentProcessing`](#onpaymentprocessing)
- [`onCheckoutAfterProcessingWithSuccess`](#oncheckoutafterprocessingwithsuccess)
- [`onCheckoutAfterProcessingWithError`](#oncheckoutafterprocessingwitherror)
- [`onShippingRateSuccess`](#onshippingratesuccess)
- [`onShippingRateFail`](#onshippingratefail)
- [`onShippingRateSelectSuccess`](#onshippingrateselectsuccess)
- [`onShippingRateSelectFail`](#onshippingrateselectfail)
The architecture of the Checkout Block is derived from the following principles:
@ -75,7 +74,7 @@ The following boolean flags available related to status are:
**isComplete**: When the checkout status is `COMPLETE` this flag is true. Checkout will have this status after all observers on the events emitted during the `AFTER_PROCESSING` status are completed successfully. When checkout is at this status, the shopper's browser will be redirected to the value of `redirectUrl` at that point (usually the `order-received` route).
### Special States:
##### Special States:
The following are booleans exposed via the checkout provider that are independent from each other and checkout statuses but can be used in combination to react to various state in the checkout.

View File

@ -1,19 +1,18 @@
# Payment Method Integration for the Checkout Block
# Payment Method Integration for the Checkout Block <!-- omit in toc -->
The checkout block has an API interface for payment methods to integrate that consists of both a server side and client side implementation.
> **Note:** This API is fairly stable, but we're still really early in the checkout block release plan so it _is_ possible this might slightly change as more payment methods are integrated and we discover areas needing improvement. So monitoring this API will be needed.
**Table of Contents**
## Table of Contents <!-- omit in toc -->
- [Payment Method Integration for the Checkout Block](#payment-method-integration-for-the-checkout-block)
- [Client Side integration](#client-side-integration)
- [Express payment methods - `registerExpressPaymentMethod( paymentMethodCreator )`](#express-payment-methods---registerexpresspaymentmethod-paymentmethodcreator-)
- [Payment Methods - `registerPaymentMethod( paymentMethodCreator )`](#payment-methods---registerpaymentmethod-paymentmethodcreator-)
- [Props Fed to Payment Method Nodes](#props-fed-to-payment-method-nodes)
- [Server Side Integration](#server-side-integration)
- [Processing Payment](#processing-payment)
- [Registering Assets](#registering-assets)
- [Client Side integration](#client-side-integration)
- [Express payment methods - `registerExpressPaymentMethod( paymentMethodCreator )`](#express-payment-methods---registerexpresspaymentmethod-paymentmethodcreator-)
- [Payment Methods - `registerPaymentMethod( paymentMethodCreator )`](#payment-methods---registerpaymentmethod-paymentmethodcreator-)
- [Props Fed to Payment Method Nodes](#props-fed-to-payment-method-nodes)
- [Server Side Integration](#server-side-integration)
- [Processing Payment](#processing-payment)
- [Registering Assets](#registering-assets)
## Client Side integration