The remote server returned an error: (401) Unauthorized with paypal
<p><strong>Scenario</strong> </p>

<p>Here I am doing direct payment with Credit Card with <code>paypal</code>, I am storing CC details in paypal account and <code>paypal</code> return Credit Card Token, And I am saving this Token number in my Database to do direct payment, And by the use of this token I am able to do direct payment with Sandbox account But when I am doing the same for live account than getting error as follow.</p>

<blockquote>
  <p>The remote server returned an error: (401) Unauthorized.</p>
</blockquote>

<p>This is getting in my error response : </p>

<blockquote>
  <p>{"name":"UNAUTHORIZED_PAYMENT","message":"Unauthorized
  payment.","information_link":"<a href="https://developer.paypal.com/webapps/developer/docs/api/#UNAUTHORIZED_PAYMENT" rel="nofollow">https://developer.paypal.com/webapps/developer/docs/api/#UNAUTHORIZED_PAYMENT</a>","debug_id":"be6ad614a3843"}</p>
</blockquote>

<p>This is code</p>

<pre><code>try
{
    Dictionary&lt;string, string&gt; sdkConfig = new Dictionary&lt;string, string&gt;();
    sdkConfig.Add("mode", "live");
    string accessToken = new OAuthTokenCredential(PayPalConfig.PaypalClientId, PayPalConfig.PaypalClientSecret, sdkConfig).GetAccessToken();
    APIContext apiContext = new APIContext(accessToken);
    apiContext.Config = sdkConfig;

    // Items within a transaction.
    var item = new Item()
    {
        name = "Item Name",
        currency = "USD",
        price = "1",
        quantity = "8",
        sku = "sku"
    };

    // A resource representing a credit card that can be used to fund a payment.
    var credCardToken = new CreditCardToken()
    {
        credit_card_id = "Here CC Token Number"
    };

    var amnt = new Amount()
    {
       currency = "USD",
       total = "10",
       details = new Details()
       {
           shipping = "1",
           subtotal = "8",
           tax = "1"
       }
   };

   // A transaction defines the contract of a
   // payment - what is the payment for and who
   // is fulfilling it. 
   var tran = new Transaction()
   {
      amount = amnt,
      description = "This is the payment transaction description.",
      item_list = new ItemList() { items = new List&lt;Item&gt;() { item } }
   };

   // A resource representing a Payer's funding instrument. For stored credit card payments, set the CreditCardToken field on this object.
   var fundInstrument = new FundingInstrument()
   {
       credit_card_token = credCardToken
   };

   // A Payment Resource; create one using the above types and intent as 'sale'
   var pymnt = new Payment()
   {
       intent = "sale",
       payer = new Payer()
       {
           funding_instruments = new List&lt;FundingInstrument&gt;() { fundInstrument },
           payment_method = "credit_card"
       },
       transactions = new List&lt;Transaction&gt;() { tran }
    };

    // Create a payment using a valid APIContext
    var createdPayment = pymnt.Create(apiContext);
}
catch (Exception ex)
{
    throw;
}
</code></pre>

<p>If some one have any idea about this issue than please let me know. Or suggest me where I am doing wrong.</p>