diff --git a/src/Service/SaferPayOrderStatusService.php b/src/Service/SaferPayOrderStatusService.php index 38dd60f0..711b837c 100755 --- a/src/Service/SaferPayOrderStatusService.php +++ b/src/Service/SaferPayOrderStatusService.php @@ -127,6 +127,12 @@ public function setComplete(Order $order) $saferPayOrder->captured = 1; $saferPayOrder->update(); + + //NOTE: Older PS versions does not handle same state change, so we need to check if state is already set + if ($order->getCurrentState() === _SAFERPAY_PAYMENT_COMPLETED_) { + return; + } + $order->setCurrentState(_SAFERPAY_PAYMENT_COMPLETED_); }