Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Max 28 posts 80 karma points
    Aug 06, 2014 @ 11:37
    Max
    0

    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?

  • Max 28 posts 80 karma points
    Aug 06, 2014 @ 12:15
    Max
    102

    Did it like this:

    var config = _configProvider.GetSection<PayPalPaymentMethodServiceConfigurationSection>();

    if(config.Sandbox)

    where _configProvider is an constructor-injected CommerceConfigurationProvider.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 07, 2014 @ 08:37
    Søren Spelling Lund
    0

    Thanks for following up with the solution.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 12, 2014 @ 10:58
    Søren Spelling Lund
    0

    Could I ask you to mark your own answer as the solution so it's removed from the queue? Thanks.

  • Max 28 posts 80 karma points
    Aug 12, 2014 @ 11:15
    Max
    0

    Sure, done =)

Please Sign in or register to post replies

Write your reply to:

Draft