Skip to content

Commit

Permalink
VCST-26121: Fix Operation Cancel Exception - if payment method was de…
Browse files Browse the repository at this point in the history
…activated from store (#62)
  • Loading branch information
OlegoO authored Feb 24, 2025
1 parent 461c453 commit e1dc620
Show file tree
Hide file tree
Showing 3 changed files with 282 additions and 269 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ protected override IQueryable<StorePaymentMethodEntity> BuildQuery(IRepository r
{
var query = ((IPaymentRepository)repository).PaymentMethods;

// Return only registered payment methods
var registeredPaymentMethods = AbstractTypeFactory<PaymentMethod>.AllTypeInfos.Select(x => x.Type.Name).ToArray();
query = query.Where(x => registeredPaymentMethods.Contains(x.Code));

if (!string.IsNullOrEmpty(criteria.Keyword))
{
query = query.Where(x => x.Code.Contains(criteria.Keyword) || x.Id.Contains(criteria.Keyword));
Expand Down
4 changes: 2 additions & 2 deletions src/VirtoCommerce.Payment.Web/module.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<dependency id="VirtoCommerce.Store" version="3.809.0" />
</dependencies>
<title>Payment module</title>
<description>Add payment methods management</description>
<description>Provides management and integration of various payment methods.</description>
<authors>
<author>Virto Commerce</author>
</authors>
Expand All @@ -20,7 +20,7 @@
<iconUrl>Modules/$(VirtoCommerce.Payment)/Content/logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes />
<copyright>Copyright © 2011-2024 Virto Commerce. All rights reserved</copyright>
<copyright>Copyright © 2011-2025 Virto Commerce. All rights reserved</copyright>
<tags>payments</tags>
<assemblyFile>VirtoCommerce.PaymentModule.Web.dll</assemblyFile>
<moduleType>VirtoCommerce.PaymentModule.Web.Module, VirtoCommerce.PaymentModule.Web</moduleType>
Expand Down
Loading

0 comments on commit e1dc620

Please sign in to comment.