Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared Libs
Adyen Magento2
Commits
a690f9d1
Commit
a690f9d1
authored
Nov 16, 2018
by
Giorgos Adam
Committed by
GitHub
Nov 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #341 from Adyen/CloudAPI
Disabling POS Cloud for backend orders
parents
df808b37
b601a34f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
43 deletions
+4
-43
Controller/Process/Json.php
Controller/Process/Json.php
+2
-8
Gateway/Http/Client/TransactionPosCloudSync.php
Gateway/Http/Client/TransactionPosCloudSync.php
+1
-1
etc/config.xml
etc/config.xml
+1
-1
view/adminhtml/templates/form/pos_cloud.phtml
view/adminhtml/templates/form/pos_cloud.phtml
+0
-33
No files found.
Controller/Process/Json.php
View file @
a690f9d1
...
...
@@ -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'
);
...
...
Gateway/Http/Client/TransactionPosCloudSync.php
View file @
a690f9d1
...
...
@@ -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
(
__
(
"P
os Time
out."
));
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
"P
OS connection timed
out."
));
}
//Provide receipt to the shopper
...
...
etc/config.xml
View file @
a690f9d1
...
...
@@ -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>
...
...
view/adminhtml/templates/form/pos_cloud.phtml
deleted
100644 → 0
View file @
df808b37
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment