Repository navigation
2.1.2
Maintenance pass over the payment callback controller.
- Load the order and confirm it exists and that
$order->moduleis this module. The controller previously never loaded theOrderobject at all, it only built anOrderHistory. - Check the settlement currency and amount reported for the order against
total_paidand the order currency; only an underpayment is rejected, with a rounding tolerance. - A payload that carries no settlement amount is logged and passes through unchanged.
Version bumped to 2.1.2 in composer.json; $this->version left at 2.0.0 as before.
Note for review: the legacy branch reads $_POST[$key] after testing Tools::getIsset($key), which also matches query-string keys, so a key present only in the query string reads as undefined. Harmless today because the signature check rejects such a payload, but worth tidying. Separately, Tools::file_get_contents is used to load the public certificate and its TLS behaviour varies by PrestaShop version - worth confirming against the versions we support.
Needs a store smoke test on both callback formats before release. Merging this fires the release workflow.