File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33## Unreleased
44
55- Cart requests that include a ` couponCode ` param are now rate-limited. (GHSA-h5gm -x9wr-vhcm)
6+ - Fixed a bug where a negative payment amount could be set on an order. (GHSA-78vr -q6cf-c7p6)
67
78## 4.11.1 - 2026-04-30
89
Original file line number Diff line number Diff line change @@ -2449,14 +2449,19 @@ public function getPaymentAmount(): float
24492449 /**
24502450 * Sets the order's payment amount in the order's currency. This amount is not persisted.
24512451 *
2452+ * This will remain null if set to zero or a negative number.
2453+ *
24522454 * @throws CurrencyException
24532455 * @throws InvalidConfigException
24542456 */
24552457 public function setPaymentAmount (float $ amount ): void
24562458 {
24572459 $ paymentCurrency = Plugin::getInstance ()->getPaymentCurrencies ()->getPaymentCurrencyByIso ($ this ->getPaymentCurrency ());
24582460 $ amount = Currency::round ($ amount , $ paymentCurrency );
2459- $ this ->_paymentAmount = $ amount ;
2461+
2462+ if ($ amount >= 0 ) {
2463+ $ this ->_paymentAmount = $ amount ;
2464+ }
24602465 }
24612466
24622467 /**
You can’t perform that action at this time.
0 commit comments