# Gateways::validatePayPalCapture()

> Checks whether a PayPal capture response actually paid for the order

- Source: `src/Gateways.php#L152` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/src/Gateways.php#L152>

```php
Gateways::validatePayPalCapture(array $paypalResponse): bool
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$paypalResponse` | `array` | `–` |

## Return type

`bool`

`true` when every capture is settled, `false` when at least one capture is still pending

## Exceptions

| Type | Description |
| --- | --- |
| `Exception` | merx.paypalError when the order was not captured or a capture was declined |

## Description

PayPal answers with HTTP 2xx even when the order was not captured, so the
status has to be checked explicitly before an order is marked as paid.

## Parent class

`Wagnerwagner\Merx\Gateways`
