Skip to content

Commit

Permalink
Fix retrieving new payment state when transaction is cancelled
Browse files Browse the repository at this point in the history
CS-5071
  • Loading branch information
MarijaIv committed Apr 3, 2024
1 parent 32ce9a5 commit 6b437d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function getNewPaymentState(Webhook $webhook, TransactionHistory $transac
$newState = $processor->process();

if ($webhook->isSuccess() && $webhook->getEventCode(
) === EventCodes::CANCELLATION && !$capturedAmount) {
) === EventCodes::CANCELLATION && (!$capturedAmount || !$capturedAmount->getValue())) {
$newState = PaymentStates::STATE_CANCELLED;
}

Expand Down

0 comments on commit 6b437d2

Please sign in to comment.