C# RestAPI hangs at await
365tech
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Apr-12-2019
06:41 AM
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.
Labels:
Login to Me Too
- Labels:
-
Webhooks REST APIs
2 REPLIES 2
domonicg
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May-12-2019
09:43 AM
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);
Internetwerk
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep-11-2019
12:55 AM
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.