How to read values from paypal.config in custom PayPalWebSitePaymentsStandardPageBuilder class code
I am implementing PayPal Website Payments Pro with a custom PayPalWebSitePaymentsStandardPageBuilder instance. I need to read the value of "Sandbox=True/False" form paypal.config.
How can I access these values from code, without having to read the file via general XML classes?
How to read values from paypal.config in custom PayPalWebSitePaymentsStandardPageBuilder class code
I am implementing PayPal Website Payments Pro with a custom PayPalWebSitePaymentsStandardPageBuilder instance. I need to read the value of "Sandbox=True/False" form paypal.config.
How can I access these values from code, without having to read the file via general XML classes?
Did it like this:
var config = _configProvider.GetSection<PayPalPaymentMethodServiceConfigurationSection>();
if(config.Sandbox)
where _configProvider is an constructor-injected CommerceConfigurationProvider.
Thanks for following up with the solution.
Could I ask you to mark your own answer as the solution so it's removed from the queue? Thanks.
Sure, done =)
is working on a reply...