We will be off on April 7th (Monday) for public holiday in our country

Commit 32de28fb authored by attilak's avatar attilak

Resolve code review comments

Send Oney payment method through skipDetails
parent 429344c9
......@@ -128,11 +128,9 @@ class Redirect extends \Magento\Payment\Block\Form
if ($this->getPaymentMethodSelectionOnAdyen()) {
$url = 'https://test.adyen.com/hpp/select.shtml';
} else {
if ($this->_adyenHelper->isPaymentMethodOpenInvoiceMethod(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
) || $this->_adyenHelper->isPaymentMethodMolpayMethod(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
)
if ($this->_adyenHelper->doesPaymentMethodSkipDetails(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
)
) {
$url = "https://test.adyen.com/hpp/skipDetails.shtml";
} else {
......@@ -148,11 +146,9 @@ class Redirect extends \Magento\Payment\Block\Form
if ($this->getPaymentMethodSelectionOnAdyen()) {
$url = 'https://live.adyen.com/hpp/select.shtml';
} else {
if ($this->_adyenHelper->isPaymentMethodOpenInvoiceMethod(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
) || $this->_adyenHelper->isPaymentMethodMolpayMethod(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
)
if ($this->_adyenHelper->doesPaymentMethodSkipDetails(
$this->_order->getPayment()->getAdditionalInformation('brand_code')
)
) {
$url = "https://live.adyen.com/hpp/skipDetails.shtml";
} else {
......@@ -432,7 +428,6 @@ class Redirect extends \Magento\Payment\Block\Form
$count = 0;
$currency = $this->_order->getOrderCurrencyCode();
foreach ($this->_order->getAllVisibleItems() as $item) {
/** @var $item \Magento\Sales\Model\Order\Item */
++$count;
......
......@@ -1007,6 +1007,38 @@ class Data extends AbstractHelper
return false;
}
/**
* @param $paymentMethod
* @return bool
*/
public function isPaymentMethodOneyMethod($paymentMethod)
{
if (strpos($paymentMethod, 'facilypay_') !== false) {
return true;
}
return false;
}
/**
* @param $paymentMethod
* @return bool
*/
public function doesPaymentMethodSkipDetails($paymentMethod)
{
if ($this->isPaymentMethodOpenInvoiceMethod($paymentMethod) ||
$this->isPaymentMethodMolpayMethod($paymentMethod) ||
$this->isPaymentMethodOneyMethod($paymentMethod)
) {
return true;
}
return false;
}
/**
* @return mixed
*/
public function getRatePayId()
{
return $this->getAdyenHppConfigData("ratepay_id");
......@@ -1245,7 +1277,7 @@ class Data extends AbstractHelper
// item id is optional
if ($itemId) {
$formFields['openinvoicedata.' . $linename . '.itemId '] = $itemId;
$formFields['openinvoicedata.' . $linename . '.itemId'] = $itemId;
}
$formFields['openinvoicedata.' . $linename . '.currencyCode'] = $currencyCode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment