Merx

Gateways::validatePayPalCapture()

Checks whether a PayPal capture response actually paid for the order

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