Skip to content

Commit

Permalink
Merge pull request #2326 from Adyen/develop-8
Browse files Browse the repository at this point in the history
Release 8.22.4
  • Loading branch information
candemiralp authored Nov 7, 2023
2 parents 0eab1b4 + 61ede02 commit 367b599
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
34 changes: 18 additions & 16 deletions Cron/Providers/PayByLinkExpiredPaymentOrdersProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,16 @@ protected function getExpiredOrders($expiredOrderIds): array
->setValue(Order::STATE_NEW)
->create();

$orderIdFilter = $this->filterBuilder->setField('state')
$orderIdFilter = $this->filterBuilder->setField('entity_id')
->setConditionType('in')
->setValue($expiredOrderIds)
->create();

$filterGroup = $this->filterGroupBuilder->setFilters([$stateFilter, $orderIdFilter])->create();
$stateFilterGroup = $this->filterGroupBuilder->setFilters([$stateFilter])->create();
$orderIdFilterGroup = $this->filterGroupBuilder->setFilters([$orderIdFilter])->create();

$searchCriteria = $this->searchCriteriaBuilder
->setFilterGroups([$filterGroup])
->setFilterGroups([$stateFilterGroup, $orderIdFilterGroup])
->setSortOrders([$sortOrder])
->setPageSize(500)
->create();
Expand All @@ -149,22 +150,23 @@ protected function getPendingPayByLinkPayments(): array
{
$sortOrder = new SortOrder();
$sortOrder->setField('parent_id')->setDirection('DESC');
$payPerLinkFilters = [
$this->filterBuilder->setField('method')
->setConditionType('eq')
->setValue(PaymentMethods::ADYEN_PAY_BY_LINK)
->create(),
$this->filterBuilder->setField('adyen_psp_reference')
->setConditionType('null')
->create()
];

$filterGroup = $this->filterGroupBuilder->setFilters($payPerLinkFilters)->create();

$paymentMethodFilter = $this->filterBuilder->setField('method')
->setConditionType('eq')
->setValue(PaymentMethods::ADYEN_PAY_BY_LINK)
->create();

$pspreferenceFilter = $this->filterBuilder->setField('adyen_psp_reference')
->setConditionType('null')
->create();

$paymentMethodFilterGroup = $this->filterGroupBuilder->setFilters([$paymentMethodFilter])->create();
$pspreferenceFilterGroup = $this->filterGroupBuilder->setFilters([$pspreferenceFilter])->create();

$searchCriteria = $this->searchCriteriaBuilder
->setFilterGroups([$filterGroup])
->setFilterGroups([$paymentMethodFilterGroup, $pspreferenceFilterGroup])
->setSortOrders([$sortOrder])
->setPageSize(1000)
->setPageSize(500)
->create();

return $this->orderPaymentRepository->getList($searchCriteria)->getItems();
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "8.22.3",
"version": "8.22.4",
"license": "MIT",
"repositories": [
{
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="8.22.3">
<module name="Adyen_Payment" setup_version="8.22.4">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
Expand Down

0 comments on commit 367b599

Please sign in to comment.