Skip to content

2.1.2

Choose a tag to compare

@github-actions github-actions released this 31 Jul 17:25
· 9 commits to master since this release
e274612

Maintenance pass over the payment callback handler.

  • Check the settlement currency and amount reported for the order against the invoice total and the client currency before the payment is recorded; only an underpayment is rejected, with a rounding tolerance.
  • A payload that carries no settlement amount is logged and passes through unchanged.
  • Stop reusing the $data variable for the invoice row - it still held the decoded JSON payload.

Invoice ownership and replay protection were already covered by checkCbInvoiceID() and checkCbTransID(), so nothing was added there.

Note for review: this file uses the legacy mysql_* helpers (mysql_fetch_array, mysql_fetch_assoc), as does spectrocoin/order.php. That predates this branch and relies on WHMCS's own shims; worth confirming it still holds on the WHMCS and PHP versions we support, because the PAID branch would fail there.

No code version field in this plugin, so nothing to bump. Needs a smoke test on both callback formats before release. Merging this fires the release workflow.