We are building a microservice-based solution using abp.io and the ABP Payment module.
In our payment workflow, we use PaymentRequestProductCreateDto
, which has an ExtraProperties
property of type Dictionary<string, IPaymentRequestProductExtraParameterConfiguration>
.
We need to pass custom gateway configuration data (e.g., ZendaPaymentRequestProductExtraParameterConfiguration) through this property.
public class ZendaPaymentRequestProductExtraParameterConfiguration : IPaymentRequestProductExtraParameterConfiguration
{
public string RegisterNo { get; set; }
}
However, when sending this DTO between services (e.g., via HTTP), we encounter the following error during deserialization
Deserialization of interface or abstract types is not supported. Type 'Volo.Payment.IPaymentRequestProductExtraParameterConfiguration'. Path: $.products[0].extraProperties.Zenda | LineNumber: 0 | BytePositionInLine: 165.
Expected behaviour: We would like to be able to pass custom configuration objects in ExtraProperties across microservice boundaries without serialization issues, or have guidance on the recommended ABP approach for this scenario.
Question: What is the recommended way to use ExtraProperties for gateway-specific configuration in a microservice environment, given the interface-based dictionary and serialization limitations?