Note that there are some explanatory texts on larger screens.

plurals
  1. POServer unavailable error on calling Payment.Create in PayPal sdk
    primarykey
    data
    text
    <p>I downloaded the Paypal SDK for C# and am trying to create a basic payment in my asp.net mvc app. I'm running the exact code mentioned in the paypal dev site, <a href="https://developer.paypal.com/webapps/developer/docs/api/#create-a-payment" rel="noreferrer">https://developer.paypal.com/webapps/developer/docs/api/#create-a-payment</a> but am getting an error (stack trace below). I'm able to get an access token so I'm assuming the app is able to communicate with the endpoint, but not sure why it complains in the Payment.create method. This is the first time I'm using asp.net mvc so am a little confused about what I could be doing wrong and would really appreciate any help :)</p> <p>My Web.config file has this section:</p> <pre><code> &lt;paypal&gt; &lt;settings&gt; &lt;add name="endpoint" value="https://api.sandbox.paypal.com" /&gt; &lt;add name="connectionTimeout" value="360000" /&gt; &lt;add name="requestRetries" value="1" /&gt; &lt;add name="ClientID" value="xyz" /&gt; &lt;add name="ClientSecret" value="abc" /&gt; &lt;/settings&gt; &lt;/paypal&gt; </code></pre> <p>Stack trace:</p> <pre><code>PayPal.Exception.PayPalException was unhandled by user code HResult=-2146233088 Message=Exception in HttpConnection Execute: Invalid HTTP response The remote server returned an error: (503) Server Unavailable. Source=PayPalCoreSDK StackTrace: at PayPal.PayPalResource.ConfigureAndExecute[T](Dictionary`2 config, IAPICallPreHandler apiCallPreHandler, HttpMethod httpMethod, String resourcePath) at PayPal.PayPalResource.ConfigureAndExecute[T](APIContext apiContext, HttpMethod httpMethod, String resource, String payload) at PayPal.Api.Payments.Payment.Create(APIContext apiContext) at PayPal.Api.Payments.Payment.Create(String accessToken) at Requext.Controllers.EventController.CreatePayment() in c:\Users\Ishan\Source\Repos\requext.com\Requext\Controllers\EventController.cs:line 169 at Requext.Controllers.EventController.Test() in c:\Users\Ishan\Source\Repos\requext.com\Requext\Controllers\EventController.cs:line 95 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass42.&lt;BeginInvokeSynchronousActionMethod&gt;b__41() at System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass8`1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass37.&lt;&gt;c__DisplayClass39.&lt;BeginInvokeActionMethodWithFilters&gt;b__33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass4f.&lt;InvokeActionMethodFilterAsynchronously&gt;b__49() InnerException: PayPal.Exception.ConnectionException HResult=-2146233088 Message=Invalid HTTP response The remote server returned an error: (503) Server Unavailable. Source=PayPalCoreSDK Response="" StackTrace: at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest) InnerException: </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload