From 060f63c04f0f34f645200b5d4da9212125c49177 Mon Sep 17 00:00:00 2001 From: Thomas Roberts <5656702+opr@users.noreply.github.com> Date: Fri, 16 Sep 2022 08:10:24 -0700 Subject: [PATCH] Fix indentation on payment method integration documentation (#7156) --- .../payment-method-integration.md | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md b/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md index 6898f3ba1..572da21e3 100644 --- a/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md +++ b/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md @@ -5,15 +5,15 @@ The checkout block has an API interface for payment methods to integrate that co ## Table of Contents - [Client Side integration](#client-side-integration) - - [Express payment methods - `registerExpressPaymentMethod( options )`](#express-payment-methods---registerexpresspaymentmethod-options-) - - [`name` (required)](#name-required) - - [`content` (required)](#content-required) - - [`edit` (required)](#edit-required) - - [`canMakePayment` (required):](#canmakepayment-required) - - [`paymentMethodId`](#paymentmethodid) - - [`supports:features`](#supportsfeatures) - - [Payment Methods - `registerPaymentMethod( options )`](#payment-methods---registerpaymentmethod-options-) - - [Props Fed to Payment Method Nodes](#props-fed-to-payment-method-nodes) + - [Express payment methods - `registerExpressPaymentMethod( options )`](#express-payment-methods---registerexpresspaymentmethod-options-) + - [`name` (required)](#name-required) + - [`content` (required)](#content-required) + - [`edit` (required)](#edit-required) + - [`canMakePayment` (required):](#canmakepayment-required) + - [`paymentMethodId`](#paymentmethodid) + - [`supports:features`](#supportsfeatures) + - [Payment Methods - `registerPaymentMethod( options )`](#payment-methods---registerpaymentmethod-options-) + - [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) @@ -87,13 +87,13 @@ A callback to determine whether the payment method should be available as an opt ```ts canMakePayment( { - cart: Cart, - cartTotals: CartTotals, - cartNeedsShipping: boolean, - shippingAddress: CartShippingAddress, - billingData: BillingData, - selectedShippingMethods: Record, - paymentRequirements: string[], + cart: Cart, + cartTotals: CartTotals, + cartNeedsShipping: boolean, + shippingAddress: CartShippingAddress, + billingData: BillingData, + selectedShippingMethods: Record, + paymentRequirements: string[], } ) ``` @@ -151,12 +151,11 @@ The options you feed the configuration instance are the same as those for expres A big part of the payment method integration is the interface that is exposed for payment methods to use via props when the node provided is cloned and rendered on block mount. While all the props are listed below, you can find more details about what the props reference, their types etc via the [typedefs described in this file](../../../../assets/js/types/type-defs/payment-method-interface.ts). -| Property | Type | Description | Values | -| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -| `activePaymentMethod` | String | The slug of the current active payment method in the checkout. | - | -| `billing` | Object | Contains everything related to billing. | `billingData`, `cartTotal`, `currency`, `cartTotalItems`, `displayPricesIncludingTax`, `appliedCoupons`, `customerId` | -| `cartData` | Object | Data exposed from the cart including items, fees, and any registered extension data. Note that this data should be treated as immutable (should not be modified/mutated) or it will result in errors in your application. | `cartItems`, `cartFees`, `extensions` | -| `checkoutStatus` | Object | The current checkout status exposed as various boolean state. | `isCalculating`, `isComplete`, `isIdle`, `isProcessing` | +| Property | Type | Description | Values | +| ------ | ------ | ------ | ------ | +| `activePaymentMethod` | String | The slug of the current active payment method in the checkout. | +| `billing` | Object | Contains everything related to billing. | `billingData`, `cartTotal`, `currency`, `cartTotalItems`, `displayPricesIncludingTax`, `appliedCoupons`, `customerId` | +| `cartData` | Object | Data exposed from the cart including items, fees, and any registered extension data. Note that this data should be treated as immutable (should not be modified/mutated) or it will result in errors in your application. | `cartItems`, `cartFees`, `extensions` | `checkoutStatus` | Object | The current checkout status exposed as various boolean state. | `isCalculating`, `isComplete`, `isIdle`, `isProcessing` | | `components` | Object | It exposes React components that can be implemented by your payment method for various common interface elements used by payment methods. | | | `emitResponse` | Object | Contains some constants that can be helpful when using the event emitter. Read the _[Emitting Events](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/e267cd96a4329a4eeef816b2ef627e113ebb72a5/docs/extensibility/checkout-flow-and-events.md#emitting-events)_ section for more details. | | | `eventRegistration` | object | Contains all the checkout event emitter registration functions. These are functions the payment method can register observers on to interact with various points in the checkout flow (see [this doc](./checkout-flow-and-events.md) for more info). | `onCheckoutValidationBeforeProcessing`, `onCheckoutAfterProcessingWithSuccess`, `onCheckoutAfterProcessingWithError`, `onPaymentProcessing`, `onShippingRateSuccess`, `onShippingRateFail`, `onShippingRateSelectSuccess`, `onShippingRateSelectFail` |