Skip to content

2.1.2

Choose a tag to compare

@github-actions github-actions released this 31 Jul 17:23
· 10 commits to master since this release
ce0c1ee

Maintenance pass over the payment callback controller.

  • Load the order and confirm it exists and that $order->module is this module. The controller previously never loaded the Order object at all, it only built an OrderHistory.
  • Check the settlement currency and amount reported for the order against total_paid and 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.