$merx->createOrder()
Stores order page to file system
$merx->createOrder(array $data = []): Wagnerwagner\Merx\OrderPage
Parameters
| Name | Type | Default |
|---|---|---|
$data |
array |
[] |
Return type
Exceptions
| Type | Description |
|---|---|
Exception |
error.merx.cart.stock or error.merx.cart.soldOut when the stock ran out before the payment was completed |
Description
Checks the stock again, calls completePayment of the payment gateway,
lowers the stock of the ordered products while
wagnerwagner.merx.reduceStock is true, and deletes the cart.