fetchOrder
Constants
- fetchOrder ⇒
Promise.<Object> Fetch the order.
- placeOrder ⇒
Promise.<Object> Place an order.
- getPaymentIntent ⇒
Promise.<Object> Get payment intent.
fetchOrder ⇒ Promise.<Object>
Fetch the order.
Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:
ErrorIf the response status is not 200.
| Param | Type | Description |
|---|---|---|
| token | string | The authorization token. |
placeOrder ⇒ Promise.<Object>
Place an order.
Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:
ErrorIf the response status is not 201.
| Param | Type | Description |
|---|---|---|
| token | string | The authorization token. |
| order | Object | The order data. |
getPaymentIntent ⇒ Promise.<Object>
Get payment intent.
Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:
ErrorIf the response status is not 201.
| Param | Type | Description |
|---|---|---|
| token | string | The authorization token. |
| amount | number | The amount to be paid. |