Open sushantjw opened 9 months ago
Hi @sushantjw, thanks for opening this issue, with the given steps I wasn't able to reproduce this issue and we don't expect an order with null
status when we process notifications
Hey @hossam-adyen, thank you for the reply. We have list of orders which don't have any state and status all created through failed payment. The Adyen event log all show that these orders have failed authorization due to unsupported card or failed 3DS. From my understanding, these orders should get cancellation event which doesn't seems to be there in Adyen event log.
Dear @sushantjw,
Upon processing, those orders failed to be canceled due to the lack of a current state. This is unexpected, as orders should always have a state at this stage. Could you please investigate the logs from both Magento and Adyen to determine why these orders were created without a state?
if ($action) {
if ($methodInstance->isInitializeNeeded()) {
$stateObject = new \Magento\Framework\DataObject();
// For method initialization we have to use original config value for payment action
$methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject);
$orderState = $stateObject->getData('state') ?: $orderState;
$orderStatus = $stateObject->getData('status') ?: $orderStatus;
$isCustomerNotified = $stateObject->hasData('is_notified')
? $stateObject->getData('is_notified')
: $isCustomerNotified;
} else {
$orderState = Order::STATE_PROCESSING;
$this->processAction($action, $order);
$orderState = $order->getState() ? $order->getState() : $orderState;
$orderStatus = $order->getStatus() ? $order->getStatus() : $orderStatus;
}
}
...
...
...
...
$this->updateOrder($order, $orderState, $orderStatus, $isCustomerNotified);
This is the place() method in Magento (https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Sales/Model/Order/Payment.php)
When I use invalid card the function executes the else block and calls $this->processAction($action, $order); method. The order state and status are never commited at this step and the execution throws an exception so it doesn't hit the update order code and never saves the order state and status.
The JCB card that I am currently testing with always comes with empty state and status. Note: JCB is not accepted card in our merchant account.
Hi @sushantjw, thanks for the insights, to take this further, can you share the exception that you are mentioning with the stack trace for this case?
can also confirm this issue on Adobe Commerce ver. 2.4.6-p3 Adyen version 9.3.
we also do have this issue for a long time, we tried to figure out with support and sent a lot of logs. maybe you can get something out case: 03141095
also what @sushantjw says is similar to our situation, The JCB card that I am currently testing with always comes with empty state and status. Note: JCB is not accepted card in our merchant account.
@hossam-adyen do you perhaps have any update?
Same here. Adobe Commerce Version: 2.4.5-p5 Adyen Version: 9.4.1
Not opened a case with the adyen support yet, since there seems to be some ongoing, but @hossam-adyen feel free to ask questions if this can help.
Also confirmed 2.4.6-p6 Adyen Version 9.8.1
Describe the bug When the payment is refused for the order the order does not get any cancellation request and stays with null status.
To Reproduce
Expected behavior Get a cancellation request if the order is not further proceeded.
Magento version 2.4.6-p3
Plugin version 8.18.1
Screenshots
**Desktop
Additional context Adyen Log: ERROR: Unhandled order state '' {"orderId":"361373","orderIncrementId":"1001423590","orderState":null,"orderStatus":null,"pspReference":"L36XBG7HCXTZ9V72"} {"uid":"79d7d9f"}