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

SUPESC-811 Added compatibility with module Country version 4. #48

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1af7fe9
SUPESC-811 added compatibility with country min 4 ver
olhalivitchuk Mar 13, 2024
5bfc930
SUPESC-811 addjusted php min ver
olhalivitchuk Mar 13, 2024
0d48d28
SUPESC-811 fixed meta files
olhalivitchuk Mar 13, 2024
11c2124
SUPESC-811 fix for stuck CI checks
olhalivitchuk Mar 15, 2024
7534875
SUPESC-811 fix php version for CI checks
olhalivitchuk Mar 15, 2024
9bfeaf1
SUPESC-811 fixed CI for prefer lowest check
olhalivitchuk Mar 15, 2024
c3c1e80
SUPESC-811 Fixed CI issues
olhalivitchuk Mar 15, 2024
d4e76f9
SUPESC-811 Fixed CI issues
olhalivitchuk Mar 15, 2024
9559388
SUPESC-811 Fixed CI issues
olhalivitchuk Mar 15, 2024
e20c8c2
SUPESC-811 Fixed CI issues
olhalivitchuk Mar 15, 2024
557cd23
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
deca146
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
d931788
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
3550f06
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
ec6b04a
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
672615f
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
9e3e7f6
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
6c8aa47
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
f6f8037
SUPESC-811 Fix for tests
olhalivitchuk Mar 18, 2024
ba31942
SUPESC-811 Fixed phpstan issues
olhalivitchuk Mar 18, 2024
76d987f
SUPESC-811 Fixed phpstan issues
olhalivitchuk Mar 18, 2024
14b25ef
SUPESC-811 Fixed phpstan issues
olhalivitchuk Mar 18, 2024
3388902
SUPESC-811 removed redundant lines
olhalivitchuk Mar 18, 2024
1b235f0
SUPESC-811 test commit for checking CS
olhalivitchuk Mar 18, 2024
bbd75c8
SUPESC-811 updated composer.json
olhalivitchuk Mar 22, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ on:
jobs:
ci:
name: "Computop"
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.1']
php: ['8.1', '8.2']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

lowest:
name: Prefer Lowest
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- name: Checkout@v2
Expand All @@ -118,7 +118,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
extensions: mbstring, intl, bcmath

- name: Composer prefer lowest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![CI](https://github.com/spryker-eco/computop/actions/workflows/ci.yml/badge.svg)](https://github.com/spryker-eco/computop/actions/workflows/ci.yml)
[![Latest Stable Version](https://poser.pugx.org/spryker-eco/computop/v/stable.svg)](https://packagist.org/packages/spryker-eco/computop)
[![License](https://img.shields.io/github/license/spryker-eco/computop.svg?b=master)](https://github.com/spryker-eco/computop)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)

Computop module provides main business logic for [Computop](https://computop.com/) payment system integration.

Expand All @@ -15,4 +15,4 @@ composer require spryker-eco/computop

## Documentation

[Documentation](https://docs.spryker.com/docs/scos/user/technology-partners/202108.0/payment-partners/computop/computop.html)
[Documentation](https://docs.spryker.com/)
2 changes: 1 addition & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include:
paths:
tests: tests
support: .
log: tests/_output
output: tests/_output
data: tests/_data
envs: tests/_envs

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"description": "Computop module",
"license": "MIT",
"require": {
"php": ">=7.4",
"php": ">=8.1",
"spryker-eco/computop-api": "^1.2.0",
"spryker-eco/computop-extension": "^1.0.0",
"spryker-shop/checkout-page": "^3.0.0",
"spryker/application": "^3.0.0",
"spryker/calculation": "^4.0.0",
"spryker/checkout-extension": "^1.0.0",
"spryker/config": "^3.0.0",
"spryker/country": "^3.2.0",
"spryker/country": "^3.2.0 || ^4.0.0",
"spryker/kernel": "^3.30.0",
"spryker/messenger": "^3.0.0",
"spryker/money": "^2.0.0",
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ parameters:
- 'src//SprykerEco//Yves//Computop//CheckoutWidget'
ignoreErrors:
- '#Call to method .+\(\) on an unknown class Generated\\.+\\Ide\\AutoCompletion.#'
- '#Call to an undefined method Propel\\.+#'
- '#Call to an undefined method Spryker\\Shared\\Kernel\\Transfer\\.+#'
- '#Call to an undefined method SprykerEco\\Zed\\Computop\\Business\\Oms\\Command\\Manager\\ManagerInterface.+#'
- '#Parameter .+ of method .+ expects Generated\\Shared\\Transfer\\.+Transfer, Spryker\\Shared\\Kernel\\Transfer\\.+ given.#'
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/CreditCardSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class CreditCardSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/DirectDebitSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class DirectDebitSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/EasyCreditSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class EasyCreditSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/IdealSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class IdealSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/PayNowSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class PayNowSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/PayPalSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class PayPalSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/PaydirektSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class PaydirektSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/PayuCeeSingleSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class PayuCeeSingleSubForm extends AbstractSubForm
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/SprykerEco/Yves/Computop/Form/SofortSubForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Generated\Shared\Transfer\PaymentTransfer;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
*/
class SofortSubForm extends AbstractSubForm
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Generated\Shared\Transfer\OrderTransfer;
use Orm\Zed\Sales\Persistence\SpySalesOrderItem;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Collection\Collection;

class CancelManager extends AbstractManager implements CancelManagerInterface
{
Expand All @@ -35,9 +35,9 @@ function () use ($orderItems): void {
/**
* @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
*
* @return \Propel\Runtime\Collection\ObjectCollection|\Orm\Zed\Sales\Persistence\SpySalesOrderItem[]
* @return \Propel\Runtime\Collection\Collection<\Orm\Zed\Sales\Persistence\SpySalesOrderItem>
*/
public function getCanceledItems(OrderTransfer $orderTransfer): ObjectCollection
public function getCanceledItems(OrderTransfer $orderTransfer): Collection
{
return $this
->queryContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace SprykerEco\Zed\Computop\Business\Oms\Command\Manager;

use Generated\Shared\Transfer\OrderTransfer;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Collection\Collection;

interface CancelManagerInterface
{
Expand All @@ -22,7 +22,7 @@ public function changeComputopItemsStatus(array $orderItems): array;
/**
* @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
*
* @return \Propel\Runtime\Collection\ObjectCollection
* @return \Propel\Runtime\Collection\Collection
*/
public function getCanceledItems(OrderTransfer $orderTransfer): ObjectCollection;
public function getCanceledItems(OrderTransfer $orderTransfer): Collection;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
namespace SprykerEco\Zed\Computop\Business\Oms\Command\Manager;

use Generated\Shared\Transfer\OrderTransfer;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Collection\Collection;

class CaptureManager extends AbstractManager
{
/**
* @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
*
* @return \Propel\Runtime\Collection\ObjectCollection|\Orm\Zed\Sales\Persistence\SpySalesOrderItem[]
* @return \Propel\Runtime\Collection\Collection<\Orm\Zed\Sales\Persistence\SpySalesOrderItem>
*/
public function getItemsBeforeCaptureState(OrderTransfer $orderTransfer): ObjectCollection
public function getItemsBeforeCaptureState(OrderTransfer $orderTransfer): Collection
{
return $this
->queryContainer
Expand All @@ -31,9 +31,9 @@ public function getItemsBeforeCaptureState(OrderTransfer $orderTransfer): Object
/**
* @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
*
* @return \Propel\Runtime\Collection\ObjectCollection|\Orm\Zed\Sales\Persistence\SpySalesOrderItem[]
* @return \Propel\Runtime\Collection\Collection<\Orm\Zed\Sales\Persistence\SpySalesOrderItem>
*/
public function getAllItems(OrderTransfer $orderTransfer): ObjectCollection
public function getAllItems(OrderTransfer $orderTransfer): Collection
{
return $this
->queryContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace SprykerEco\Zed\Computop\Business\Oms\Command\Manager;

use Generated\Shared\Transfer\OrderTransfer;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Collection\Collection;

class RefundManager extends AbstractManager
{
Expand Down Expand Up @@ -47,9 +47,9 @@ protected function isShipmentRefundNeeded(OrderTransfer $orderTransfer): bool
/**
* @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
*
* @return \Propel\Runtime\Collection\ObjectCollection|\Orm\Zed\Sales\Persistence\SpySalesOrderItem[]
* @return \Propel\Runtime\Collection\Collection<\Orm\Zed\Sales\Persistence\SpySalesOrderItem>
*/
protected function getItemsBeforeRefundState(OrderTransfer $orderTransfer): ObjectCollection
protected function getItemsBeforeRefundState(OrderTransfer $orderTransfer): Collection
{
return $this
->queryContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\Persistence\ComputopRepositoryInterface getRepository()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class GatewayController extends AbstractGatewayController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\ComputopConfig getConfig()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class AuthorizePlugin extends AbstractComputopPlugin implements CommandByOrderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\ComputopConfig getConfig()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class CancelPlugin extends AbstractComputopPlugin implements CommandByOrderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\ComputopConfig getConfig()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class CapturePlugin extends AbstractComputopPlugin implements CommandByOrderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\ComputopConfig getConfig()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class EasyCreditAuthorizePlugin extends AbstractComputopPlugin implements CommandByOrderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @method \SprykerEco\Zed\Computop\Business\ComputopFacadeInterface getFacade()
* @method \SprykerEco\Zed\Computop\ComputopConfig getConfig()
* @method \SprykerEco\Zed\Computop\Communication\ComputopCommunicationFactory getFactory()
*/
class RefundPlugin extends AbstractComputopPlugin implements CommandByOrderInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Orm\Zed\Computop\Persistence\SpyPaymentComputopDetail;
use Orm\Zed\Computop\Persistence\SpyPaymentComputopOrderItem;
use Orm\Zed\Sales\Persistence\SpySalesOrderItem;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Collection\Collection;

class ComputopMapper
{
Expand Down Expand Up @@ -52,13 +52,13 @@ public function mapComputopPaymentTransferToComputopPaymentEntity(
}

/**
* @param \Propel\Runtime\Collection\ObjectCollection $salesOrderItemEntityCollection
* @param \Propel\Runtime\Collection\Collection $salesOrderItemEntityCollection
* @param \Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer $computopSalesOrderItemCollectionTransfer
*
* @return \Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer
*/
public function mapSalesOrderItemEntityCollectionToComputopSalesOrderItemCollectionTransfer(
ObjectCollection $salesOrderItemEntityCollection,
Collection $salesOrderItemEntityCollection,
ComputopSalesOrderItemCollectionTransfer $computopSalesOrderItemCollectionTransfer
): ComputopSalesOrderItemCollectionTransfer {
foreach ($salesOrderItemEntityCollection as $salesOrderItemEntity) {
Expand Down Expand Up @@ -86,13 +86,13 @@ public function mapSalesOrderItemToComputopSalesOrderItemTransfer(
}

/**
* @param \Propel\Runtime\Collection\ObjectCollection $paymentComputopOrderItemEntityCollection
* @param \Propel\Runtime\Collection\Collection $paymentComputopOrderItemEntityCollection
* @param \Generated\Shared\Transfer\ComputopPaymentComputopOrderItemCollectionTransfer $computopPaymentComputopOrderItemCollectionTransfer
*
* @return \Generated\Shared\Transfer\ComputopPaymentComputopOrderItemCollectionTransfer
*/
public function mapPaymentComputopOrderItemEntityCollectionToComputopPaymentComputopOrderItemTransferCollection(
ObjectCollection $paymentComputopOrderItemEntityCollection,
Collection $paymentComputopOrderItemEntityCollection,
ComputopPaymentComputopOrderItemCollectionTransfer $computopPaymentComputopOrderItemCollectionTransfer
): ComputopPaymentComputopOrderItemCollectionTransfer {
foreach ($paymentComputopOrderItemEntityCollection as $paymentComputopOrderItemEntity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

namespace SprykerEcoTest\Yves\Computop\Mapper\Init\PrePlace;

use Codeception\TestCase\Test;
use Codeception\Test\Unit;
use SprykerEco\Yves\Computop\Mapper\Init\PrePlace\PayPalExpressToQuoteMapper;
use SprykerEcoTest\Yves\Computop\Mapper\PayPalExpressToQuoteMapperTestConstants;

class PayPalExpressToQuoteMapperTest extends Test
class PayPalExpressToQuoteMapperTest extends Unit
{
/**
* @var \SprykerEcoTest\Yves\Computop\ComputopYvesTester
Expand Down
1 change: 0 additions & 1 deletion tests/SprykerEcoTest/Yves/Computop/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ paths:
tests: .
data: ../../../_data
support: _support
log: ../../../_output
output: ../../../_output

coverage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

namespace SprykerEcoTest\Zed\Computop\Business;

use Codeception\TestCase\Test;
use Codeception\Test\Unit;
use SprykerEcoTest\Zed\Computop\Business\Oms\OmsPaymentTestHelper;
use SprykerEcoTest\Zed\Computop\Module\FunctionalModule;
use SprykerEcoTest\Zed\Computop\Order\OrderPaymentTestHelper;

abstract class AbstractSetUpTest extends Test
abstract class AbstractSetUpTest extends Unit
{
/**
* @var \SprykerEcoTest\Zed\Computop\Module\FunctionalModule
Expand Down
Loading
Loading