Skip to content

Commit

Permalink
Add missing request builders
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Böttcher committed Aug 28, 2020
1 parent 184fe5a commit e138b4b
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Components/RequestBuilder/EpsRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\RequestBuilder;

use PayonePayment\PaymentMethod\PayoneEps;
use PayonePayment\Struct\PaymentTransaction;
use Shopware\Core\Framework\Context;
use Symfony\Component\HttpFoundation\ParameterBag;

class EpsRequestBuilder extends AbstractRequestBuilder
{
public function supports(string $paymentMethodId): bool
{
return $paymentMethodId === PayoneEps::UUID;
}

public function getAdditionalRequestParameters(PaymentTransaction $transaction, Context $context, ParameterBag $parameterBag): array
{
return [];
}
}
23 changes: 23 additions & 0 deletions src/Components/RequestBuilder/IDealRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\RequestBuilder;

use PayonePayment\PaymentMethod\PayoneIDeal;
use PayonePayment\Struct\PaymentTransaction;
use Shopware\Core\Framework\Context;
use Symfony\Component\HttpFoundation\ParameterBag;

class IDealRequestBuilder extends AbstractRequestBuilder
{
public function supports(string $paymentMethodId): bool
{
return $paymentMethodId === PayoneIDeal::UUID;
}

public function getAdditionalRequestParameters(PaymentTransaction $transaction, Context $context, ParameterBag $parameterBag): array
{
return [];
}
}
23 changes: 23 additions & 0 deletions src/Components/RequestBuilder/PaydirektRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\RequestBuilder;

use PayonePayment\PaymentMethod\PayonePaydirekt;
use PayonePayment\Struct\PaymentTransaction;
use Shopware\Core\Framework\Context;
use Symfony\Component\HttpFoundation\ParameterBag;

class PaydirektRequestBuilder extends AbstractRequestBuilder
{
public function supports(string $paymentMethodId): bool
{
return $paymentMethodId === PayonePaydirekt::UUID;
}

public function getAdditionalRequestParameters(PaymentTransaction $transaction, Context $context, ParameterBag $parameterBag): array
{
return [];
}
}
23 changes: 23 additions & 0 deletions src/Components/RequestBuilder/PrepaymentRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\RequestBuilder;

use PayonePayment\PaymentMethod\PayonePrepayment;
use PayonePayment\Struct\PaymentTransaction;
use Shopware\Core\Framework\Context;
use Symfony\Component\HttpFoundation\ParameterBag;

class PrepaymentRequestBuilder extends AbstractRequestBuilder
{
public function supports(string $paymentMethodId): bool
{
return $paymentMethodId === PayonePrepayment::UUID;
}

public function getAdditionalRequestParameters(PaymentTransaction $transaction, Context $context, ParameterBag $parameterBag): array
{
return [];
}
}
16 changes: 16 additions & 0 deletions src/DependencyInjection/handler/request_handler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,21 @@
<service id="PayonePayment\Components\RequestBuilder\SofortBankingRequestBuilder">
<tag name="payone_payment.request_handler" />
</service>

<service id="PayonePayment\Components\RequestBuilder\PrepaymentRequestBuilder">
<tag name="payone_payment.request_handler" />
</service>

<service id="PayonePayment\Components\RequestBuilder\PaydirektRequestBuilder">
<tag name="payone_payment.request_handler" />
</service>

<service id="PayonePayment\Components\RequestBuilder\IDealRequestBuilder">
<tag name="payone_payment.request_handler" />
</service>

<service id="PayonePayment\Components\RequestBuilder\EpsRequestBuilder">
<tag name="payone_payment.request_handler" />
</service>
</services>
</container>

0 comments on commit e138b4b

Please sign in to comment.