Skip to content

Commit

Permalink
Merged in develop (pull request #31)
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Bohdan-Medv committed Aug 24, 2023
2 parents f7eda4a + c1f498c commit 92ea869
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.8.5
- Fix for cronjob cancellation

# 1.8.4
- Redirect token

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mediaopt/worldline",
"description": "Worldline Online Payments",
"version": "1.8.4",
"version": "1.8.5",
"type": "shopware-platform-plugin",
"license": "proprietary",
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/MoptWorldline.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class MoptWorldline extends Plugin
{
const PLUGIN_NAME = 'MoptWorldline';
const PLUGIN_VERSION = '1.8.4';
const PLUGIN_VERSION = '1.8.5';

/**
* @param InstallContext $installContext
Expand Down
4 changes: 2 additions & 2 deletions src/Service/CronTaskHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use MoptWorldline\Adapter\WorldlineSDKAdapter;
use MoptWorldline\Bootstrap\Form;
use Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler;
use Shopware\Core\Checkout\Order\OrderStates;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Framework\MessageQueue\ScheduledTask\ScheduledTaskHandler;
use Shopware\Core\Kernel;
use Shopware\Core\System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions;
use Shopware\Core\System\SystemConfig\SystemConfigService;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Contracts\Translation\TranslatorInterface;
Expand Down Expand Up @@ -126,7 +126,7 @@ private function getOrderList(string $salesChannelId, string $mode): array
)
)
->andWhere("sms.technical_name != :technicalName")
->setParameter('technicalName', StateMachineTransitionActions::ACTION_CANCEL)
->setParameter('technicalName', OrderStates::STATE_CANCELLED)
;

$timeInterval = $this->getTimeInterval($cancellationConfig) * 60 * 60;
Expand Down
5 changes: 4 additions & 1 deletion src/Service/PaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,10 @@ private function saveCustomerCustomFields(
$customFields = $customer->first()->getCustomFields();

// Token already exist
if (array_key_exists($token, $customFields[Form::CUSTOM_FIELD_WORLDLINE_CUSTOMER_SAVED_PAYMENT_CARD_TOKEN])) {
$savedCardKey = Form::CUSTOM_FIELD_WORLDLINE_CUSTOMER_SAVED_PAYMENT_CARD_TOKEN;
if (!is_null($customFields)
&& array_key_exists($savedCardKey, $customFields)
&& array_key_exists($token, $customFields[$savedCardKey])) {
return;
}

Expand Down

0 comments on commit 92ea869

Please sign in to comment.