Skip to content

Commit

Permalink
Fixed orders not completing with a processing transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Dec 6, 2023
1 parent 4f56359 commit 1242f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed a bug where sales weren’t respecting site element statuses. ([#3328](https://github.com/craftcms/commerce/issues/3328))
- Fixed a bug where soft-deleted order statuses and line item statuses would not being restored when applying project config changes. ([#3164](https://github.com/craftcms/commerce/issues/3164))
- Fixed a bug where carts weren’t being restored after logging in.
- Fixed a bug where orders with a processing transaction weren’t being completed.

## 4.3.2 - 2023-10-31

Expand Down
2 changes: 1 addition & 1 deletion src/services/Payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function processPayment(Order $order, BasePaymentForm $form, ?string &$re
return;
}

if ($transaction->status !== TransactionRecord::STATUS_SUCCESS) {
if (!in_array($transaction->status, [TransactionRecord::STATUS_SUCCESS, TransactionRecord::STATUS_PROCESSING])) {
throw new PaymentException($transaction->message);
}

Expand Down

0 comments on commit 1242f50

Please sign in to comment.