diff --git a/Observer/OrderSaveCommitAfter.php b/Observer/OrderSaveCommitAfter.php index 7d4a50cc..ede5a1f3 100644 --- a/Observer/OrderSaveCommitAfter.php +++ b/Observer/OrderSaveCommitAfter.php @@ -47,13 +47,13 @@ public function execute(\Magento\Framework\Event\Observer $observer) $amountRefunded = isset($data['amount_refunded']) ? $data['amount_refunded'] : null; if ($bHasAmountAuthorized && $amountPaid === null && $amountRefunded === null) { - payHelper::logDebug('AUTO-CAPTURING ' . $data['last_trans_id'], [], $order->getStore()); + payHelper::logNotice('AUTO-CAPTURING ' . $data['last_trans_id'], [], $order->getStore()); try { \Paynl\Config::setApiToken($this->config->getApiToken()); $result = \Paynl\Transaction::capture($data['last_trans_id']); $strResult = 'Success'; } catch (\Exception $e) { - payHelper::logDebug('Order PAY error: ' . $e->getMessage() . ' EntityId: ' . $order->getEntityId(), [], $order->getStore()); + payHelper::logCritical('Order PAY error: ' . $e->getMessage() . ' EntityId: ' . $order->getEntityId(), [], $order->getStore()); $strResult = 'Failed. Errorcode: PAY-MAGENTO2-003. See docs.pay.nl for more information'; } diff --git a/Observer/ShipmentSaveAfter.php b/Observer/ShipmentSaveAfter.php index f7859385..5eafff00 100644 --- a/Observer/ShipmentSaveAfter.php +++ b/Observer/ShipmentSaveAfter.php @@ -47,13 +47,13 @@ public function execute(\Magento\Framework\Event\Observer $observer) $amountRefunded = isset($data['amount_refunded']) ? $data['amount_refunded'] : null; if ($bHasAmountAuthorized && $amountPaid === null && $amountRefunded === null) { - payHelper::logDebug('AUTO-CAPTURING (rest)' . $data['last_trans_id'], [], $order->getStore()); + payHelper::logNotice('AUTO-CAPTURING (rest)' . $data['last_trans_id'], [], $order->getStore()); try { \Paynl\Config::setApiToken($this->config->getApiToken()); $result = \Paynl\Transaction::capture($data['last_trans_id']); $strResult = 'Success'; } catch (\Exception $e) { - payHelper::logDebug('Order PAY error (rest): ' . $e->getMessage() . ' EntityId: ' . $order->getEntityId(), [], $order->getStore()); + payHelper::logCritical('Order PAY error (rest): ' . $e->getMessage() . ' EntityId: ' . $order->getEntityId(), [], $order->getStore()); $strResult = 'Failed. Errorcode: PAY-MAGENTO2-004. See docs.pay.nl for more information'; } diff --git a/Setup/UpgradeData.php b/Setup/UpgradeData.php new file mode 100644 index 00000000..e69de29b