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
42c9dca8
Commit
42c9dca8
authored
Aug 27, 2019
by
marcoss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Implement an API endpoint for Origin Keys"
This reverts commit
d5f65e9e
.
parent
d5f65e9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
160 deletions
+0
-160
Api/AdyenOriginKeyInterface.php
Api/AdyenOriginKeyInterface.php
+0
-34
Model/AdyenOriginKey.php
Model/AdyenOriginKey.php
+0
-53
Test/Unit/Model/AdyenOriginKeyTest.php
Test/Unit/Model/AdyenOriginKeyTest.php
+0
-64
etc/di.xml
etc/di.xml
+0
-2
etc/webapi.xml
etc/webapi.xml
+0
-7
No files found.
Api/AdyenOriginKeyInterface.php
deleted
100644 → 0
View file @
d5f65e9e
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2019 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>
*/
namespace
Adyen\Payment\Api
;
interface
AdyenOriginKeyInterface
{
/**
* @return string
*/
public
function
getOriginKey
();
}
\ No newline at end of file
Model/AdyenOriginKey.php
deleted
100644 → 0
View file @
d5f65e9e
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2019 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>
*/
namespace
Adyen\Payment\Model
;
use
Adyen\AdyenException
;
use
Adyen\Payment\Helper\Data
as
AdyenHelper
;
use
Magento\Framework\Exception\NoSuchEntityException
as
MagentoNoSuchEntityException
;
class
AdyenOriginKey
implements
\Adyen\Payment\Api\AdyenOriginKeyInterface
{
/**
* @var AdyenHelper
*/
private
$helper
;
public
function
__construct
(
AdyenHelper
$helper
)
{
$this
->
helper
=
$helper
;
}
/**
* {@inheritDoc}
* @throws MagentoNoSuchEntityException
* @throws AdyenException
*/
public
function
getOriginKey
()
{
return
$this
->
helper
->
getOriginKeyForBaseUrl
();
}
}
\ No newline at end of file
Test/Unit/Model/AdyenOriginKeyTest.php
deleted
100644 → 0
View file @
d5f65e9e
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2019 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>
*/
namespace
Adyen\Payment\Model
;
use
Adyen\Payment\Helper\Data
as
AdyenHelper
;
use
PHPUnit\Framework\TestCase
;
use
PHPUnit_Framework_MockObject_MockObject
as
MockObject
;
class
AdyenOriginKeyTest
extends
TestCase
{
/** @var AdyenHelper|MockObject */
private
$helper
;
protected
function
setUp
()
{
$this
->
helper
=
$this
->
getMockBuilder
(
AdyenHelper
::
class
)
->
disableOriginalConstructor
()
->
getMock
();
}
/** @throws \Exception */
public
function
testGetOriginKey
()
{
$this
->
helper
->
method
(
'getOriginKeyForBaseUrl'
)
->
willReturn
(
'something'
);
$module
=
new
AdyenOriginKey
(
$this
->
helper
);
$this
->
assertEquals
(
'something'
,
$module
->
getOriginKey
());
}
/** @throws \Exception */
public
function
testGetOriginKeyDoesNotHandleExceptions
()
{
$this
->
helper
->
method
(
'getOriginKeyForBaseUrl'
)
->
willThrowException
(
new
\Exception
(
'Some error message'
,
400
));
$module
=
new
AdyenOriginKey
(
$this
->
helper
);
$this
->
expectException
(
\Exception
::
class
);
$this
->
expectExceptionMessage
(
'Some error message'
);
$this
->
expectExceptionCode
(
400
);
$module
->
getOriginKey
();
}
}
etc/di.xml
View file @
42c9dca8
...
...
@@ -972,8 +972,6 @@
type=
"Adyen\Payment\Model\AdyenPaymentProcess"
/>
<preference
for=
"Adyen\Payment\Api\AdyenThreeDS2ProcessInterface"
type=
"Adyen\Payment\Model\AdyenThreeDS2Process"
/>
<preference
for=
"Adyen\Payment\Api\AdyenOriginKeyInterface"
type=
"Adyen\Payment\Model\AdyenOriginKey"
/>
<type
name=
"Magento\Vault\Api\PaymentTokenRepositoryInterface"
>
<plugin
name=
"AdyenPaymentVaultDeleteToken"
type=
"Adyen\Payment\Plugin\PaymentVaultDeleteToken"
sortOrder=
"10"
/>
</type>
...
...
etc/webapi.xml
View file @
42c9dca8
...
...
@@ -71,11 +71,4 @@
<resource
ref=
"anonymous"
/>
</resources>
</route>
<route
url=
"/V1/adyen/originKey"
method=
"GET"
>
<service
class=
"Adyen\Payment\Api\AdyenOriginKeyInterface"
method=
"getOriginKey"
/>
<resources>
<resource
ref=
"anonymous"
/>
</resources>
</route>
</routes>
\ 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