C# RestAPI hangs at await

365tech
Contributor
Contributor

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. 

Login to Me Too
2 REPLIES 2

domonicg
Contributor
Contributor

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);

 

 

Login to Me Too

Internetwerk
New Community Member

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

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.