Skip to content

Commit

Permalink
Merge pull request #31 from nenes25/nenes25-patch-oney
Browse files Browse the repository at this point in the history
Fix unknown Zend_Log constant
  • Loading branch information
GIMALima authored Jan 24, 2023
2 parents c35fde7 + 0c1a59f commit c911db5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Model/Method/Oney.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
if ($quote->getCustomerId() && ! preg_match(Checkout::CUST_ID_REGEX, $quote->getCustomerId())) {
// Customer id doesn't match Oney rules.
$msg = 'Customer ID "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.';
$this->dataHelper->log(sprintf($msg, $quote->getCustomerId(), Checkout::CUST_ID_REGEX), Zend_Log::WARN);
$this->dataHelper->log(sprintf($msg, $quote->getCustomerId(), Checkout::CUST_ID_REGEX), \Psr\Log\LogLevel::WARNING);
return false;
}

Expand All @@ -233,7 +233,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
if (! preg_match(Checkout::ORDER_ID_REGEX, $quote->getReservedOrderId())) {
// Order id doesn't match Oney rules.
$msg = 'The order ID "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.';
$this->dataHelper->log(sprintf($msg, $quote->getReservedOrderId(), Checkout::ORDER_ID_REGEX), Zend_Log::WARN);
$this->dataHelper->log(sprintf($msg, $quote->getReservedOrderId(), Checkout::ORDER_ID_REGEX), \Psr\Log\LogLevel::WARNING);
return false;
}

Expand All @@ -246,7 +246,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
if (! preg_match(Checkout::PRODUCT_REF_REGEX, $item->getProductId())) {
// Product id doesn't match Oney rules.
$msg = 'Product reference "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.';
$this->dataHelper->log(sprintf($msg, $item->getProductId(), Checkout::PRODUCT_REF_REGEX), Zend_Log::WARN);
$this->dataHelper->log(sprintf($msg, $item->getProductId(), Checkout::PRODUCT_REF_REGEX), \Psr\Log\LogLevel::WARNING);
return false;
}
}
Expand All @@ -255,7 +255,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
$shippingMethod = $this->checkoutHelper->toPayzenCarrier($quote->getShippingAddress()->getShippingMethod());
if (! $shippingMethod) {
// Selected shipping method is not mapped in configuration panel.
$this->dataHelper->log('Shipping method "' . $quote->getShippingAddress()->getShippingMethod() . '" is not correctly mapped in module configuration panel. Module is not displayed.', Zend_Log::WARN);
$this->dataHelper->log('Shipping method "' . $quote->getShippingAddress()->getShippingMethod() . '" is not correctly mapped in module configuration panel. Module is not displayed.', \Psr\Log\LogLevel::WARNING);
return false;
}
}
Expand Down

0 comments on commit c911db5

Please sign in to comment.