We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit b601a34f authored by Giorgos Adam's avatar Giorgos Adam

Disabling POS Cloud for backend orders

Accepting notifications for multiple merchant accounts
parent 257987b1
......@@ -267,21 +267,15 @@ class Json extends \Magento\Framework\App\Action\Action
return false;
}
$accountCmp = !$this->_adyenHelper->getAdyenAbstractConfigDataFlag('multiple_merchants')
? strcmp($submitedMerchantAccount, $internalMerchantAccount)
: 0;
$usernameCmp = strcmp($_SERVER['PHP_AUTH_USER'], $username);
$passwordCmp = strcmp($_SERVER['PHP_AUTH_PW'], $password);
if ($accountCmp === 0 && $usernameCmp === 0 && $passwordCmp === 0) {
if ($usernameCmp === 0 && $passwordCmp === 0) {
return true;
}
// If notification is test check if fields are correct if not return error
if ($this->_isTestNotification($response['pspReference'])) {
if ($accountCmp != 0) {
$this->_returnResult('MerchantAccount in notification is not the same as in Magento settings');
} elseif ($usernameCmp != 0 || $passwordCmp != 0) {
if ($usernameCmp != 0 || $passwordCmp != 0) {
$this->_returnResult(
'username (PHP_AUTH_USER) and\or password (PHP_AUTH_PW) are not the same as Magento settings'
);
......
......@@ -101,7 +101,7 @@ class TransactionPosCloudSync implements ClientInterface
$totalTimeout = $this->adyenHelper->getAdyenPosCloudConfigData('total_timeout', $this->storeId);
if ($timeDiff > $totalTimeout) {
throw new \Magento\Framework\Exception\LocalizedException(__("Pos Timeout."));
throw new \Magento\Framework\Exception\LocalizedException(__("POS connection timed out."));
}
//Provide receipt to the shopper
......
......@@ -162,7 +162,7 @@
<can_use_checkout>1</can_use_checkout>
<can_capture>1</can_capture>
<can_capture_partial>1</can_capture_partial>
<can_use_internal>1</can_use_internal>
<can_use_internal>0</can_use_internal>
<can_refund_partial_per_invoice>1</can_refund_partial_per_invoice>
<can_refund>1</can_refund>
<can_void>1</can_void>
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2018 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*
* Author: Adyen <magento@adyen.com>
*/
// @codingStandardsIgnoreFile
$code = $block->escapeHtml($block->getMethodCode());
?>
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */ echo $code; ?>"
style="display:none">
</fieldset>
\ No newline at end of file
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