# PayPalPayment::createPayPalPayment()

> Create PayPal order from OrderPage

- See also: `https://developer.paypal.com/docs/api/orders/v2/#orders_create PayPal REST API Documentation`
- Source: `src/PayPalPayment.php#L34` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/src/PayPalPayment.php#L34>

```php
PayPalPayment::createPayPalPayment(Wagnerwagner\Merx\OrderPage $virtualOrderPage, string $currency): array
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$virtualOrderPage` | `Wagnerwagner\Merx\OrderPage` | `–` |
| `$currency` | `string` | `–` |

## Return type

`array`

PayPal order details.
              - 'id': (string) The ID of the order.
              - 'status': (string) The order status.
              - 'payment_source': (array) The payment source used to fund the payment.
              - 'links': (array) An array of request-related HATEOAS links. To complete payer approval, use the approve link to redirect the payer.

## Parent class

`Wagnerwagner\Merx\PayPalPayment`
