Update payment docs (https://github.com/woocommerce/woocommerce-blocks/pull/11751)
* Update payment docs * Update payment docs * Update docs/internal-developers/block-client-apis/checkout/checkout-flow-and-events.md Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com> --------- Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
This commit is contained in:
parent
894f8e9ac4
commit
edbfb862b1
|
@ -267,7 +267,7 @@ When a payment method returns a non-truthy value, if it returns a valid response
|
||||||
|
|
||||||
#### Success
|
#### Success
|
||||||
|
|
||||||
A response is considered a success response when it at a minimum is an object with this shape:
|
A successful response should be given when the user's entered data is correct and the payment checks are successful. A response is considered successful if, at a minimum, it is an object with this shape:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const successResponse = { type: 'success' };
|
const successResponse = { type: 'success' };
|
||||||
|
@ -283,7 +283,7 @@ If `billingAddress` or `shippingAddress` properties aren't in the response objec
|
||||||
|
|
||||||
#### Fail
|
#### Fail
|
||||||
|
|
||||||
A response is considered a fail response when it at a minimum is an object with this shape:
|
A fail response should be given when there is an error with the payment processing. A response is considered a fail response when it is an object with this shape:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const failResponse = { type: 'failure' };
|
const failResponse = { type: 'failure' };
|
||||||
|
@ -298,7 +298,7 @@ When a fail response is returned by an observer, the payment method context stat
|
||||||
|
|
||||||
#### Error
|
#### Error
|
||||||
|
|
||||||
A response is considered an error response when it at a minimum is an object with this shape:
|
An error response should be given when there is an error with the user input on the checkout form. A response is considered an error response when it is an object with this shape:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const errorResponse = { type: 'error' };
|
const errorResponse = { type: 'error' };
|
||||||
|
|
Loading…
Reference in New Issue