mirror of
https://github.com/vr-payment/shopware-6.git
synced 2026-06-04 10:53:18 +00:00
Release 6.1.11
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
# 6.1.11
|
||||||
|
- Implement payment page integration.
|
||||||
|
- Fixed bug with duplicate payment methods appearing
|
||||||
|
|
||||||
# 6.1.10
|
# 6.1.10
|
||||||
- Multiple/bulk refund for line item.
|
- Multiple/bulk refund for line item.
|
||||||
- Partial line item refund.
|
- Partial line item refund.
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# 6.1.11
|
||||||
|
- Integration der Zahlungsseite implementieren.
|
||||||
|
- Fehler mit doppelten angezeigten Zahlungsmethoden behoben
|
||||||
|
|
||||||
# 6.1.10
|
# 6.1.10
|
||||||
- Mehrfache/gesammelte Rückerstattung für Einzelposten.
|
- Mehrfache/gesammelte Rückerstattung für Einzelposten.
|
||||||
- Teilweise Rückerstattung von Einzelposten.
|
- Teilweise Rückerstattung von Einzelposten.
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ tail -f var/log/vrpayment_payment*.log
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
[Documentation](https://gateway.vr-payment.de/doc/shopware-6/6.1.10/docs/en/documentation.html)
|
[Documentation](https://gateway.vr-payment.de/doc/shopware-6/6.1.11/docs/en/documentation.html)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -59,5 +59,5 @@
|
|||||||
"vrpayment/sdk": "4.6.0"
|
"vrpayment/sdk": "4.6.0"
|
||||||
},
|
},
|
||||||
"type": "shopware-platform-plugin",
|
"type": "shopware-platform-plugin",
|
||||||
"version": "6.1.10"
|
"version": "6.1.11"
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.10/">
|
<a href="https://github.com/vr-payment/shopware-6/releases/tag/6.1.11/">
|
||||||
Source
|
Source
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
+92
-42
@@ -10,7 +10,9 @@ use Shopware\Core\{
|
|||||||
Content\ImportExport\Struct\Config,
|
Content\ImportExport\Struct\Config,
|
||||||
Content\Media\MediaDefinition,
|
Content\Media\MediaDefinition,
|
||||||
Framework\Context,
|
Framework\Context,
|
||||||
|
Framework\DataAbstractionLayer\EntityRepository,
|
||||||
Framework\DataAbstractionLayer\Search\Criteria,
|
Framework\DataAbstractionLayer\Search\Criteria,
|
||||||
|
Framework\DataAbstractionLayer\Search\EntitySearchResult,
|
||||||
Framework\DataAbstractionLayer\Search\Filter\EqualsFilter,
|
Framework\DataAbstractionLayer\Search\Filter\EqualsFilter,
|
||||||
Framework\Plugin\Util\PluginIdProvider,
|
Framework\Plugin\Util\PluginIdProvider,
|
||||||
Framework\Uuid\Uuid};
|
Framework\Uuid\Uuid};
|
||||||
@@ -32,7 +34,6 @@ use VRPaymentPayment\Core\{
|
|||||||
Util\LocaleCodeProvider};
|
Util\LocaleCodeProvider};
|
||||||
use VRPaymentPayment\VRPaymentPayment;
|
use VRPaymentPayment\VRPaymentPayment;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PaymentMethodConfigurationService
|
* Class PaymentMethodConfigurationService
|
||||||
*
|
*
|
||||||
@@ -102,6 +103,31 @@ class PaymentMethodConfigurationService {
|
|||||||
*/
|
*/
|
||||||
private $paymentMethodRepository;
|
private $paymentMethodRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface
|
||||||
|
*/
|
||||||
|
private $salesChannelPaymentRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface
|
||||||
|
*/
|
||||||
|
private $mediaRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface
|
||||||
|
*/
|
||||||
|
private $mediaFolderRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface
|
||||||
|
*/
|
||||||
|
private $mediaDefaultFolderRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface
|
||||||
|
*/
|
||||||
|
private $vRPaymentPaymentMethodConfigurationRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PaymentMethodConfigurationService constructor.
|
* PaymentMethodConfigurationService constructor.
|
||||||
*
|
*
|
||||||
@@ -109,21 +135,39 @@ class PaymentMethodConfigurationService {
|
|||||||
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
||||||
* @param \Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Entity\MediaSerializer $mediaSerializer
|
* @param \Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Entity\MediaSerializer $mediaSerializer
|
||||||
* @param \Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\SerializerRegistry $serializerRegistry
|
* @param \Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\SerializerRegistry $serializerRegistry
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $salesChannelPaymentRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $paymentMethodRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $mediaRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $mediaFolderRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $mediaDefaultFolderRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $ruleRepository
|
||||||
|
* @param \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository $vRPaymentPaymentMethodConfigurationRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
SettingsService $settingsService,
|
SettingsService $settingsService,
|
||||||
ContainerInterface $container,
|
ContainerInterface $container,
|
||||||
MediaSerializer $mediaSerializer,
|
MediaSerializer $mediaSerializer,
|
||||||
SerializerRegistry $serializerRegistry
|
SerializerRegistry $serializerRegistry,
|
||||||
)
|
EntityRepository $salesChannelPaymentRepository,
|
||||||
{
|
EntityRepository $paymentMethodRepository,
|
||||||
$this->container = $container;
|
EntityRepository $mediaRepository,
|
||||||
$this->ruleRepository = $this->container->get('rule.repository');
|
EntityRepository $mediaFolderRepository,
|
||||||
|
EntityRepository $mediaDefaultFolderRepository,
|
||||||
|
EntityRepository $ruleRepository,
|
||||||
|
EntityRepository $vRPaymentPaymentMethodConfigurationRepository,
|
||||||
|
) {
|
||||||
$this->settingsService = $settingsService;
|
$this->settingsService = $settingsService;
|
||||||
|
$this->container = $container;
|
||||||
$this->mediaSerializer = $mediaSerializer;
|
$this->mediaSerializer = $mediaSerializer;
|
||||||
$this->serializerRegistry = $serializerRegistry;
|
$this->serializerRegistry = $serializerRegistry;
|
||||||
|
$this->salesChannelPaymentRepository = $salesChannelPaymentRepository;
|
||||||
|
$this->paymentMethodRepository = $paymentMethodRepository;
|
||||||
|
$this->mediaRepository = $mediaRepository;
|
||||||
|
$this->mediaFolderRepository = $mediaFolderRepository;
|
||||||
|
$this->mediaDefaultFolderRepository = $mediaDefaultFolderRepository;
|
||||||
|
$this->ruleRepository = $ruleRepository;
|
||||||
|
$this->vRPaymentPaymentMethodConfigurationRepository = $vRPaymentPaymentMethodConfigurationRepository;
|
||||||
$this->localeCodeProvider = $this->container->get(LocaleCodeProvider::class);
|
$this->localeCodeProvider = $this->container->get(LocaleCodeProvider::class);
|
||||||
$this->paymentMethodRepository = $this->container->get('payment_method.repository');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -212,15 +256,7 @@ class PaymentMethodConfigurationService {
|
|||||||
|
|
||||||
$criteria = (new Criteria())->addFilter(new EqualsFilter('spaceId', $this->getSpaceId()));
|
$criteria = (new Criteria())->addFilter(new EqualsFilter('spaceId', $this->getSpaceId()));
|
||||||
|
|
||||||
/**
|
$paymentMethodConfigurationEntities = $this->vRPaymentPaymentMethodConfigurationRepository
|
||||||
* @var $vRPaymentPMConfigurationRepository
|
|
||||||
*/
|
|
||||||
$vRPaymentPMConfigurationRepository = $this->container->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository');
|
|
||||||
|
|
||||||
/** @var EntityRepositoryInterface $salesChannelPaymentRepository */
|
|
||||||
$salesChannelPaymentRepository = $this->container->get('sales_channel_payment_method.repository');
|
|
||||||
|
|
||||||
$paymentMethodConfigurationEntities = $vRPaymentPMConfigurationRepository
|
|
||||||
->search($criteria, $context)
|
->search($criteria, $context)
|
||||||
->getEntities();
|
->getEntities();
|
||||||
|
|
||||||
@@ -246,9 +282,9 @@ class PaymentMethodConfigurationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$vRPaymentPMConfigurationRepository->update($data, $context);
|
$this->vRPaymentPaymentMethodConfigurationRepository->update($data, $context);
|
||||||
$this->paymentMethodRepository->update($paymentMethodData, $context);
|
$this->paymentMethodRepository->update($paymentMethodData, $context);
|
||||||
$salesChannelPaymentRepository->delete($salesChannelPaymentMethodData, $context);
|
$this->salesChannelPaymentRepository->delete($salesChannelPaymentMethodData, $context);
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$this->logger->critical($exception->getMessage());
|
$this->logger->critical($exception->getMessage());
|
||||||
}
|
}
|
||||||
@@ -333,11 +369,7 @@ class PaymentMethodConfigurationService {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$this->upsertPaymentMethod($id, $paymentMethodConfiguration, $context);
|
$this->upsertPaymentMethod($id, $paymentMethodConfiguration, $context);
|
||||||
|
$this->vRPaymentPaymentMethodConfigurationRepository->upsert([$data], $context);
|
||||||
|
|
||||||
$this->container->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository')
|
|
||||||
->upsert([$data], $context);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,27 +440,27 @@ class PaymentMethodConfigurationService {
|
|||||||
new EqualsFilter('paymentMethodConfigurationId', $paymentMethodConfigurationId)
|
new EqualsFilter('paymentMethodConfigurationId', $paymentMethodConfigurationId)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->container->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository')
|
return $this->vRPaymentPaymentMethodConfigurationRepository
|
||||||
->search($criteria, $context)
|
->search($criteria, $context)
|
||||||
->getEntities()
|
->getEntities()
|
||||||
->first();
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $spaceId
|
* @param int $spaceId
|
||||||
* @param Context $context
|
* @param Context $context
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getAllPaymentMethodConfigurations(int $spaceId, Context $context): array
|
public function getAllPaymentMethodConfigurations(int $spaceId, Context $context): array
|
||||||
{
|
{
|
||||||
$criteria = (new Criteria())->addFilter(new EqualsFilter('spaceId', $spaceId));
|
$criteria = (new Criteria())->addFilter(new EqualsFilter('spaceId', $spaceId));
|
||||||
|
|
||||||
$configurations = $this->container->get(PaymentMethodConfigurationEntityDefinition::ENTITY_NAME . '.repository')
|
$configurations = $this->vRPaymentPaymentMethodConfigurationRepository
|
||||||
->search($criteria, $context)
|
->search($criteria, $context)
|
||||||
->getEntities();
|
->getEntities();
|
||||||
|
|
||||||
return $configurations->getElements();
|
return $configurations->getElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update or insert Payment Method
|
* Update or insert Payment Method
|
||||||
@@ -573,8 +605,13 @@ class PaymentMethodConfigurationService {
|
|||||||
protected function upsertMedia(string $id, PaymentMethodConfiguration $paymentMethodConfiguration, Context $context): ?string
|
protected function upsertMedia(string $id, PaymentMethodConfiguration $paymentMethodConfiguration, Context $context): ?string
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mediaDefaultFolderRepository = $this->container->get('media_default_folder.repository');
|
$existingRecord = $this->getMediaDefaultFolderForPaymentMethod($paymentMethodConfiguration, $context);
|
||||||
$mediaDefaultFolderRepository->upsert([
|
|
||||||
|
if ($existingRecord->count() > 0) {
|
||||||
|
$id = $existingRecord->first()->getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->mediaDefaultFolderRepository->upsert([
|
||||||
[
|
[
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'associationFields' => [],
|
'associationFields' => [],
|
||||||
@@ -582,8 +619,7 @@ class PaymentMethodConfigurationService {
|
|||||||
],
|
],
|
||||||
], $context);
|
], $context);
|
||||||
|
|
||||||
$mediaFolderRepository = $this->container->get('media_folder.repository');
|
$this->mediaFolderRepository->upsert([
|
||||||
$mediaFolderRepository->upsert([
|
|
||||||
[
|
[
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'defaultFolderId' => $id,
|
'defaultFolderId' => $id,
|
||||||
@@ -605,7 +641,7 @@ class PaymentMethodConfigurationService {
|
|||||||
'mediaFolderId' => $id,
|
'mediaFolderId' => $id,
|
||||||
];
|
];
|
||||||
$data = $this->mediaSerializer->deserialize(new Config([], [], []), $mediaDefinition, $data);
|
$data = $this->mediaSerializer->deserialize(new Config([], [], []), $mediaDefinition, $data);
|
||||||
$this->container->get('media.repository')->upsert([$data], $context);
|
$this->mediaRepository->upsert([$data], $context);
|
||||||
return $id;
|
return $id;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->logger->critical($e->getMessage(), [$e->getTraceAsString()]);
|
$this->logger->critical($e->getMessage(), [$e->getTraceAsString()]);
|
||||||
@@ -613,5 +649,19 @@ class PaymentMethodConfigurationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves media default folder for a given payment method configuration.
|
||||||
|
*
|
||||||
|
* @param PaymentMethodConfiguration $paymentMethodConfiguration The payment method configuration to check.
|
||||||
|
* @param Context $context The current context.
|
||||||
|
*
|
||||||
|
* @return EntitySearchResult The search result for the media default folder.
|
||||||
|
*/
|
||||||
|
private function getMediaDefaultFolderForPaymentMethod(PaymentMethodConfiguration $paymentMethodConfiguration, Context $context): ?EntitySearchResult
|
||||||
|
{
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->addFilter(new EqualsFilter('entity', 'payment_method_' . $paymentMethodConfiguration->getId()));
|
||||||
|
return $this->mediaDefaultFolderRepository->search($criteria, $context);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class SettingsCommand extends Command {
|
|||||||
SettingsService::CONFIG_INTEGRATION,
|
SettingsService::CONFIG_INTEGRATION,
|
||||||
InputOption::VALUE_OPTIONAL,
|
InputOption::VALUE_OPTIONAL,
|
||||||
SettingsService::CONFIG_INTEGRATION,
|
SettingsService::CONFIG_INTEGRATION,
|
||||||
Integration::IFRAME
|
Integration::PAYMENT_PAGE
|
||||||
)
|
)
|
||||||
->addOption(
|
->addOption(
|
||||||
SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED,
|
SettingsService::CONFIG_LINE_ITEM_CONSISTENCY_ENABLED,
|
||||||
|
|||||||
@@ -196,7 +196,11 @@ class CheckoutSubscriber implements EventSubscriberInterface
|
|||||||
private function getAvailablePaymentMethods(Settings $settings, int $createdTransactionId): void
|
private function getAvailablePaymentMethods(Settings $settings, int $createdTransactionId): void
|
||||||
{
|
{
|
||||||
$transactionService = $settings->getApiClient()->getTransactionService();
|
$transactionService = $settings->getApiClient()->getTransactionService();
|
||||||
$possiblePaymentMethods = $transactionService->fetchPaymentMethods($settings->getSpaceId(), $createdTransactionId, 'iframe');
|
$possiblePaymentMethods = $transactionService->fetchPaymentMethods(
|
||||||
|
$settings->getSpaceId(),
|
||||||
|
$createdTransactionId,
|
||||||
|
$settings->getIntegration()
|
||||||
|
);
|
||||||
$arrayOfPossibleMethods = [];
|
$arrayOfPossibleMethods = [];
|
||||||
foreach ($possiblePaymentMethods as $possiblePaymentMethod) {
|
foreach ($possiblePaymentMethods as $possiblePaymentMethod) {
|
||||||
$arrayOfPossibleMethods[] = $possiblePaymentMethod->getid();
|
$arrayOfPossibleMethods[] = $possiblePaymentMethod->getid();
|
||||||
|
|||||||
+4
-4
@@ -41,13 +41,13 @@ Component.register('sw-vrpayment-options', {
|
|||||||
computed: {
|
computed: {
|
||||||
integrationOptions() {
|
integrationOptions() {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
id: 'iframe',
|
|
||||||
name: this.$tc('vrpayment-settings.settingForm.options.integration.options.iframe')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'payment_page',
|
id: 'payment_page',
|
||||||
name: this.$tc('vrpayment-settings.settingForm.options.integration.options.payment_page')
|
name: this.$tc('vrpayment-settings.settingForm.options.integration.options.payment_page')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'iframe',
|
||||||
|
name: this.$tc('vrpayment-settings.settingForm.options.integration.options.iframe')
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ Component.register('vrpayment-settings', {
|
|||||||
isSetDefaultPaymentSuccessful: false,
|
isSetDefaultPaymentSuccessful: false,
|
||||||
isSettingDefaultPaymentMethods: false,
|
isSettingDefaultPaymentMethods: false,
|
||||||
|
|
||||||
configIntegrationDefaultValue: 'iframe',
|
configIntegrationDefaultValue: 'payment_page',
|
||||||
configEmailEnabledDefaultValue: true,
|
configEmailEnabledDefaultValue: true,
|
||||||
configLineItemConsistencyEnabledDefaultValue: true,
|
configLineItemConsistencyEnabledDefaultValue: true,
|
||||||
configStorefrontInvoiceDownloadEnabledEnabledDefaultValue: true,
|
configStorefrontInvoiceDownloadEnabledEnabledDefaultValue: true,
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
<argument type="service" id="service_container"/>
|
<argument type="service" id="service_container"/>
|
||||||
<argument type="service" id="Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Entity\MediaSerializer"/>
|
<argument type="service" id="Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Entity\MediaSerializer"/>
|
||||||
<argument type="service" id="Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\SerializerRegistry"/>
|
<argument type="service" id="Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\SerializerRegistry"/>
|
||||||
|
<argument type="service" id="sales_channel_payment_method.repository"/>
|
||||||
|
<argument type="service" id="payment_method.repository"/>
|
||||||
|
<argument type="service" id="media.repository"/>
|
||||||
|
<argument type="service" id="media_folder.repository"/>
|
||||||
|
<argument type="service" id="media_default_folder.repository"/>
|
||||||
|
<argument type="service" id="rule.repository"/>
|
||||||
|
<argument type="service" id="vrpayment_payment_method_configuration.repository"/>
|
||||||
<call method="setLogger">
|
<call method="setLogger">
|
||||||
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
<argument type="service" id="monolog.logger.vrpayment_payment"/>
|
||||||
</call>
|
</call>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user