-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Description
No change Status when we receive "PaymentConfirmed" of Adyen
Steps to reproduce
In the menu we can select a Empty option
Payment confirmed => ['value' => '', 'label' => __('-- Please Select --')]]
Actual behavior
we need to insert a status at this stage, but we can't know the right status depending on the order progress, whether it's awaiting delivery (processing) or already delivered and invoiced (complete).
Expected behavior
In the menu we need select a Empty option to no change the status
Payment confirmed => ['value' => '', 'label' => __('-- Please Select --')]]
Code snippet or screenshots (if applicable)
In the file adyen/module-payment/Model/Config/Source/PaymentConfirmed.php
We need an ‘empty’ status so that we don't update the order status when we receive confirmation of payment from Adyen at the end of the order cycle.
In this way, we can keep the status from the previous stage.
public function toOptionArray(): array
{
$statuses = $this->stateStatuses
? $this->_orderConfig->getStateStatuses($this->stateStatuses)
: $this->_orderConfig->getStatuses();
// Before
**$options = [];**
// After
**$options = [['value' => '', 'label' => __('-- Please Select --')]];**
foreach ($statuses as $code => $label) {
$options[] = ['value' => $code, 'label' => $label];
}
return $options;
}
Adyen Magento Plugin version
9.17.1
Magento version
2.4.7 p5
Operating System
None
Browser (if applicable)
No response
Additional context and logs
No response