Open kpitn opened 11 months ago
Hi,
I Controller/Payment/Fail.php File you are using :
$action = $this->config->getValue('order_action_failed_payment', null, $storeCode); public function getValue( string $field, string $methodId = null, $storeCode = null, string $scope = ScopeInterface::SCOPE_WEBSITE ) { return $this->loader->getValue($field, $methodId, $storeCode, $scope); }
The module is config in defaut vue :
+---------+-------+--------+--------------------------------------------------------------+------+-------------------+ |config_id|scope |scope_id|path |value |updated_at | +---------+-------+--------+--------------------------------------------------------------+------+-------------------+ |1429 |default|0 |settings/checkoutcom_configuration/order_action_failed_payment|cancel|2022-08-11 08:58:17| +---------+-------+--------+--------------------------------------------------------------+------+-------------------+
$action is always NULL.
The solution is to use store scope instead of website scope.
Another patch for the module :
--- Controller/Payment/Fail.php +++ Controller/Payment/Fail.php @@ -179,7 +179,7 @@ ]); $storeCode = $this->storeManager->getStore()->getCode(); - $action = $this->config->getValue('order_action_failed_payment', null, $storeCode); + $action = $this->config->getValue('order_action_failed_payment', null, $storeCode, ScopeInterface::SCOPE_STORE); $status = $action === 'cancel' ? 'canceled' : 'false'; // Log the payment error
Hi,
I Controller/Payment/Fail.php File you are using :
The module is config in defaut vue :
$action is always NULL.
The solution is to use store scope instead of website scope.
Another patch for the module :