Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/vippsas/vipps-magento
Browse files Browse the repository at this point in the history
  • Loading branch information
cloveras committed Jul 4, 2018
2 parents c4fb64a + 60a1706 commit c5ae8ee
Show file tree
Hide file tree
Showing 144 changed files with 13,021 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.hgignore
vendor/
.idea/
.hg/
phpcs.xml
phpmd.xml
phpunit.xml
composer.lock
Jenkinsfile
54 changes: 54 additions & 0 deletions Api/CommandManagerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
/**
* Copyright 2018 Vipps
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
namespace Vipps\Payment\Api;

use Magento\Payment\{Gateway\Command\ResultInterface, Model\InfoInterface};

/**
* Interface CommandManagerInterface
* @package Vipps\Payment\Api
* @api
*/
interface CommandManagerInterface
{
/**
* Initiate payment action.
*
* @param InfoInterface $payment
* @param array $arguments
*
* @return ResultInterface|null
*/
public function initiatePayment(InfoInterface $payment, $arguments);

/**
* Get Payment details command.
*
* @param array $arguments
*
* @return mixed
*/
public function getPaymentDetails($arguments = []);

/**
* Method to execute getOrderStatus Command.
*
* @param string $orderId
*
* @return ResultInterface|null
*/
public function getOrderStatus($orderId);
}
135 changes: 135 additions & 0 deletions Api/Profiling/Data/ItemInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?php
/**
* Copyright 2018 Vipps
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
namespace Vipps\Payment\Api\Profiling\Data;

/**
* Interface ItemInterface
* @package Vipps\Payment\Api\Profiling\Data
*/
interface ItemInterface
{
/**
* @var string
*/
const ENTITY_ID = 'entity_id';

/**
* @var string
*/
const INCREMENT_ID = 'increment_id';

/**
* @var string
*/
const STATUS_CODE = 'status_code';

/**
* @var string
*/
const REQUEST_TYPE = 'request_type';

/**
* @var string
*/
const REQUEST = 'request';

/**
* @var string
*/
const RESPONSE = 'response';

/**
* @var string
*/
const CREATED_AT = 'created_at';

/**
* @return string
*/
public function getEntityId();

/**
* @param string $value
*
* @return null
*/
public function setEntityId($value);

/**
* @return string
*/
public function getIncrementId();

/**
* @param string $value
*
* @return null
*/
public function setIncrementId($value);

/**
* @return string
*/
public function getStatusCode();

/**
* @param string $value
*
* @return null
*/
public function setStatusCode($value);

/**
* @return string
*/
public function getRequestType();

/**
* @param string $value
*
* @return null
*/
public function setRequestType($value);

/**
* @return string
*/
public function getRequest();

/**
* @param string $value
*
* @return null
*/
public function setRequest($value);

/**
* @return string
*/
public function getResponse();

/**
* @param string $value
*
* @return null
*/
public function setResponse($value);

/**
* @return string
*/
public function getCreatedAt();
}
41 changes: 41 additions & 0 deletions Api/Profiling/Data/ItemSearchResultsInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* Copyright 2018 Vipps
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
namespace Vipps\Payment\Api\Profiling\Data;

use Magento\Framework\Api\SearchResultsInterface;

/**
* Interface ItemSearchResultsInterface
* @package Vipps\Payment\Api\Profiling\Data
* @api
*/
interface ItemSearchResultsInterface extends SearchResultsInterface
{
/**
* Get blocks list.
*
* @return ItemInterface[]
*/
public function getItems();

/**
* Set blocks list.
*
* @param ItemInterface[] $items
* @return $this
*/
public function setItems(array $items);
}
64 changes: 64 additions & 0 deletions Api/Profiling/ItemRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* Copyright 2018 Vipps
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
namespace Vipps\Payment\Api\Profiling;

use Vipps\Payment\Api\Profiling\Data\ItemInterface;
use Magento\Framework\Api\SearchCriteriaInterface;

/**
* Interface ItemRepositoryInterface
* @package Vipps\Payment\Api\Profiling
*/
interface ItemRepositoryInterface
{
/**
* @param ItemInterface $item
*
* @return ItemInterface
*/
public function save(ItemInterface $item);

/**
* @param SearchCriteriaInterface $searchCriteria
*
* @return ItemInterface[]
*/
public function getList(SearchCriteriaInterface $searchCriteria);

/**
* Get item by id.
*
* @param $itemId
*
* @return ItemInterface
*/
public function get($itemId);

/**
* @param ItemInterface $item
*
* @return bool
*/
public function delete(ItemInterface $item);

/**
* Remove item by id.
*
* @param int $itemId
* @return bool
*/
public function deleteById($itemId);
}
Loading

0 comments on commit c5ae8ee

Please sign in to comment.