We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1cb536 commit e0a10eaCopy full SHA for e0a10ea
src/controllers/OrdersController.php
@@ -1238,11 +1238,11 @@ public function actionTransactionRefund(): Response
1238
}
1239
1240
1241
- if (!$amount) {
+ if (!$amount || $amount <= 0) {
1242
$amount = $transaction->getRefundableAmount();
1243
1244
1245
- if ($amount > $transaction->getRefundableAmount()) {
+ if ($amount <= 0 || $amount > $transaction->getRefundableAmount()) {
1246
$error = Craft::t('commerce', 'Can not refund amount greater than the remaining amount');
1247
if ($this->request->getAcceptsJson()) {
1248
return $this->asFailure($error);
0 commit comments