Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using Grand.Business.Core.Interfaces.Checkout.Payments;
using Grand.Infrastructure.Mapper;
using Grand.Web.AdminShared.Models.Payments;
namespace Grand.Web.AdminShared.Extensions.Mapping;
public static class IPaymentMethodMappingExtensions
{
public static async Task<PaymentMethodModel> ToModel(this IPaymentProvider entity)
{
var paymentmethod = entity.MapTo<IPaymentProvider, PaymentMethodModel>();
paymentmethod.SupportCapture = await entity.SupportCapture();
paymentmethod.SupportPartiallyRefund = await entity.SupportPartiallyRefund();
paymentmethod.SupportRefund = await entity.SupportRefund();
paymentmethod.SupportVoid = await entity.SupportVoid();
return paymentmethod;
}
}