Skip to content

Commit

Permalink
updated logging level
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Jan 18, 2022
1 parent 68d2d3f commit 4caf2c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Observer/OrderSaveCommitAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down
4 changes: 2 additions & 2 deletions Observer/ShipmentSaveAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down
2 changes: 1 addition & 1 deletion Setup/UpgradeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private function updateFashionGiftcard()
if (!$result) {
return;
}
payHelper::logDebug('updateFashionGiftcard result ' . $result);

if ($result == '1699') {
# Update the incorrect profileid.
$this->resourceConfig->saveConfig($path, '1669', 'default', 0);
Expand Down

0 comments on commit 4caf2c5

Please sign in to comment.