Cannot parse *.config file – AdaptivePayments SDK (PayPal)

Hey everyone,

Just working on a small project that uses PayPal’s C# AdaptivePayments SDK. I hit an error while attempting to make the following payment:

var service = new AdaptivePaymentsService();
payResponse = service.Pay(payRequest);
“Cannot parse *.config file. Ensure you have configured the ‘paypal’ section correctly.”

at PayPal.Manager.ConfigManager..ctor()
at PayPal.Manager.ConfigManager.get_Instance()
at PayPal.BasePayPalService..ctor()
at PayPal.AdaptivePayments.AdaptivePaymentsService..ctor()

It turns out that you need to add the following entries to your Web.config:

<!-- Under configuration > configSections. Add the following entry -->
<section name="paypal" type="PayPal.Manager.SDKConfigHandler, PayPalCoreSDK" requirePermission="false"></section>
<!-- Under configuration. Add the following entry and modify to suit your app -->
      <add name="endpoint" value=""/>
      <add name="AdaptivePayments" value=""/>
      <add name="connectionTimeout" value="360000"/>
      <add name="requestRetries" value="3"/>
      <add name="IPAddress" value=""/><!-- May need to change this depending on your configuration -->
      <account apiUsername="xxx" apiPassword="xxx" apiSignature="xxx" applicationId="APP-80W284485P519543T"/>

To get the account information you’ll need to do the following:
– Go to
– Login to your sandbox account
– Go to the dashboard
– Select accounts (from the list of all your sandbox accounts)
– Create a new one or select an existing business account
– Click profile
– Click API Credentials

Note that the steps required to get this configuration seem to change all the time. Hopefully this will be enough to get you on the right track.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.