# createOrder:before

> Runs when the customer comes back from the payment provider, before the payment is captured.

- Source: `config/hooks.php#L93` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/config/hooks.php#L93>

```php
'wagnerwagner.merx.createOrder:before' => function (Wagnerwagner\Merx\OrderPage $virtualOrderPage, array $gateway, array $data): void {}
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$virtualOrderPage` | `Wagnerwagner\Merx\OrderPage` | `–` |
| `$gateway` | `array` | `–` |
| `$data` | `array` | `–` |

## Return type

`void`
