Gateways::validatePayPalOrderAmount()
Makes sure a PayPal order charges what the order costs
Gateways::validatePayPalOrderAmount(array $paypalOrder, Wagnerwagner\Merx\OrderPage $virtualOrderPage): void
Parameters
| Name | Type | Default |
|---|---|---|
$paypalOrder |
array |
- |
$virtualOrderPage |
OrderPage |
- |
Return type
void
Exceptions
| Type | Description |
|---|---|
Exception |
merx.amountMismatch |
Description
The amount is fixed when the PayPal order is created. The default purchase
unit takes it from the cart, but paypal.purchaseUnits lets a shop build
its own — a mistake there would charge the wrong amount while the order is
still marked as paid.