Skip to content

Commit

Permalink
PAYOSWXP-123
Browse files Browse the repository at this point in the history
please see related issue for more information
  • Loading branch information
rommelfreddy committed Jan 11, 2024
1 parent cd18bee commit 374fc64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Payone/RequestParameter/RequestParameterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use PayonePayment\Payone\RequestParameter\Builder\AbstractRequestParameterBuilder;
use PayonePayment\Payone\RequestParameter\Struct\AbstractRequestParameterStruct;
use PayonePayment\Payone\RequestParameter\Struct\ClientApiRequest;
use PayonePayment\Payone\RequestParameter\Struct\GetFileStruct;

class RequestParameterFactory
Expand Down Expand Up @@ -53,6 +54,12 @@ private function filterParams(AbstractRequestParameterStruct $arguments, array $
unset($parameters['aid'], $parameters['hash']);
}

if ($arguments instanceof ClientApiRequest) {
unset($parameters['key']);
} else {
unset($parameters['hash']);
}

return $parameters;
}

Expand Down
7 changes: 7 additions & 0 deletions src/Payone/RequestParameter/Struct/ClientApiRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php declare(strict_types=1);

namespace PayonePayment\Payone\RequestParameter\Struct;

interface ClientApiRequest
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PayonePayment\Payone\RequestParameter\Struct\Traits\SalesChannelContextTrait;
use Shopware\Core\System\SalesChannel\SalesChannelContext;

class CreditCardCheckStruct extends AbstractRequestParameterStruct
class CreditCardCheckStruct extends AbstractRequestParameterStruct implements ClientApiRequest
{
use SalesChannelContextTrait;

Expand Down

0 comments on commit 374fc64

Please sign in to comment.