cancel
Showing results for 
Search instead for 
Did you mean: 

C# RestAPI hangs at await

Highlighted
Contributor

C# RestAPI hangs at await

Hello, 

 

Hoping someone can help me here, I followed the guide on the paypal developer pages, however my code stops at the await call in the following code and goes nowhere. I am really not sure if I have done something wrong.  Hoping someone can help

 

Task<Order> task = VerifyPayment(orderId);
task.Wait();
var payment = task.Result;

public async static Task<Order> VerifyPayment(string orderId)
{
   OrdersGetRequest request = new OrdersGetRequest(orderId);
    var response = await PayPalClient.client().Execute(request);
    return  response.Result<Order>();
 }

Thanks in advance. 

2 REPLIES 2
Contributor

Re: C# RestAPI hangs at await

I too am experiencing the same problem. Installed the .Net SDK from nuget. I have followed the SDK guide.

 

Call just hangs when attempting to run the Execute request

 

OrdersGetRequest request = new OrdersGetRequest(orderId);

PayPalClient.client().Execute(request);

 

 

New Community Member

Re: C# RestAPI hangs at await

I have the same problem, did you find a solution?