Merx

Gateways::validatePayPalOrderIsUnused()

Makes sure a PayPal order has not been used for another order already

Gateways::validatePayPalOrderIsUnused(array $paypalOrder, Wagnerwagner\Merx\OrderPage $virtualOrderPage): void

Parameters

Name Type Default
$paypalOrder array -
$virtualOrderPage OrderPage -

Return type

void

Exceptions

Type Description
Exception merx.paypalError when the order was captured before or belongs to another order

Description

PayPal refuses a second capture itself, but relying on that leaves the
check with the provider and reports it as an unspecific API error. This
is the PayPal counterpart of the order_uid check in
completeStripePayment().

Parent class

Wagnerwagner\Merx\Gateways