Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returntypes must be compatible with CORE #195

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.7] - 2024-??-??

- [0007715](https://bugs.oxid-esales.com/view.php?id=7715): Fix wrong HTML-Code-Output
- [0007718](https://bugs.oxid-esales.com/view.php?id=7718): Fix compatibility-Issue with Core (Method-Return-Values must be compatible with CORE)

## [2.1.6] - 2024-08-15

- [0007654](https://bugs.oxid-esales.com/view.php?id=7654): Fix Capture type is incorrectly evaluated
Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'en' => 'Use of the online payment service from amazon.com'
],
'thumbnail' => 'out/img/amazon-pay-logo.png',
'version' => '2.1.6',
'version' => '2.1.7-rc.1',
'author' => 'OXID eSales AG',
'url' => 'https://www.oxid-esales.com',
'email' => '[email protected]',
Expand Down
13 changes: 5 additions & 8 deletions src/Controller/Admin/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@
*/
class ConfigController extends AdminController
{
public function __construct()
{
parent::__construct();

$this->_sThisTemplate = 'amazonpay/amazonconfig.tpl';
}
protected $_sThisTemplate = 'amazonpay/amazonconfig.tpl';

/**
* @inheritDoc
*
* @return string
*
*/
public function render()
{
Expand Down Expand Up @@ -134,13 +132,12 @@ protected function saveConfig(array $conf, int $shopId)
* Handles checkboxes/dropdowns
*
* @param array $conf
*
* @return array
*/
protected function handleSpecialFields(array $conf): array
{
$config = new Config();
$conf['blAmazonPaySandboxMode'] = $conf['blAmazonPaySandboxMode'] === 'sandbox' ? true : false;
$conf['blAmazonPaySandboxMode'] = $conf['blAmazonPaySandboxMode'] === 'sandbox';

// remove FakePrivateKeys before save
if ($conf['sAmazonPayPrivKey'] === '' || $conf['sAmazonPayPrivKey'] === $config->getFakePrivateKey()) {
Expand Down
7 changes: 7 additions & 0 deletions src/Controller/Admin/DeliverySetMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
*/
class DeliverySetMain extends DeliverySetMain_parent
{

/**
* @inheritDoc
*
* @return string
*
*/
public function render()
{
$amazonCarriers = AmazonCarrier::getAllCarriers();
Expand Down
24 changes: 19 additions & 5 deletions src/Controller/Admin/OrderArticle.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,29 @@

class OrderArticle extends OrderArticle_parent
{
public function deleteThisArticle(): void
/**
* @inheritDoc
*
* @return void
*
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function deleteThisArticle()
{
$this->refundAmazon();
parent::deleteThisArticle();
}

public function storno(): void
/**
* @inheritDoc
*
* @return void
*
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function storno()
{
$this->refundAmazon();
parent::storno();
Expand All @@ -33,10 +49,8 @@ public function storno(): void
/**
* @throws DatabaseErrorException
* @throws DatabaseConnectionException
*
* @return void
*/
private function refundAmazon()
private function refundAmazon(): void
{
$config = new Config();
if (!$config->automatedRefundActivated()) {
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/OrderList.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
class OrderList extends OrderList_parent
{
/**
* @inheritDoc
*
* @return void
*
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
Expand Down
9 changes: 2 additions & 7 deletions src/Controller/Admin/OrderOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class OrderOverview extends OrderOverview_parent
/**
* @inheritDoc
*
* @return string
*
* @throws DatabaseErrorException
* @throws DatabaseConnectionException
*/
Expand Down Expand Up @@ -125,7 +127,6 @@ public function render()
}

/**
* @return string
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
Expand Down Expand Up @@ -155,19 +156,13 @@ public function getAmazonAPIOrderStatus(): string
return $this->captureStatus;
}

/**
* @return string
*/
public function getAmazonMaximalRefundAmount(): string
{
return PhpHelper::getMoneyValue(
OxidServiceProvider::getAmazonService()->getMaximalRefundAmount($this->getEditObjectId())
);
}

/**
* @return string
*/
public function getAmazonMaximalCaptureAmount(): string
{
$order = new Order();
Expand Down
Loading