walmartlabs / partnerapi_sdk_dotnet

Walmart Partner API SDK for .NET
Other
14 stars 16 forks source link

AckOrder giving 500 error #11

Closed bikram-bikram closed 5 years ago

bikram-bikram commented 6 years ago

This SDK works great for our needs, and we have been using it to get the orders. But, when we try to acknowledge an order, we get an exception: In the code screenshot below, The line 1 works fine, and gets all the orders, but line 2 below gives an error: _API Error Occured [500 Internal Server Error] [ERROR] - SYSTEM_ERROR.GMP_GATEWAYAPI;

image

Could you please let us know if we are doing something wrong?

roman-shuhov commented 6 years ago

The code looks fine for me. I also wasn't able to repeat this error with our test account. Could you please post payload of the request response (make sure you remove all secret headers, like WM_SEC.AUTH_SIGNATURE and WM_CONSUMER.ID)? Another idea would be to use Sample app to try to acknowledge this order (this will also show you all headers and payload).

bikram-bikram commented 5 years ago

Thanks a lot for your reply. We tried using the sample solution with our credentials and get the same issue. The screenshot below is what we get when we try to acknowledge an order using the sample solution.

acknowledge order issue

Please let us know if you need any more information. Thanks again for your follow up.

roman-shuhov commented 5 years ago

I would also recommend to post this question here - https://developer.walmart.com/forums/index.php/forums It looks like there maybe an issue on the API side with this specific order, still don't have any luck with reproducing this issue.

bikram-bikram commented 5 years ago

Thanks for your reply. It cant be with a specific order, cause I have tried the code on all orders in my site, and it gives the same error every time. Do you think the issue is with permissions for the API on my account, as the read operation (getting orders) works fine, but the write operation (acknowledging orders) gives an error.

Please let me know if I can provide any other specific information for you to look into this further? Appreciate your help on this issue.

roman-shuhov commented 5 years ago

Please create topic at https://developer.walmart.com/forums/index.php/forums, we can follow up on this issue there. It looks like an issue on API side and we need someone from this team to check that.

roman-shuhov commented 5 years ago

And to your point about read-only access it may be a reason actually, but only if you have a solution providers' api key (as described here https://developer.walmart.com/#/apicenter/marketPlace/latest#authorization). Let me know if that's the case

bikram-bikram commented 5 years ago

Thanks for following up on this. We are not using a solution provider' api key, we are using the "Digital Signature based Authentication Method". We have also raised an issue in the Developers forum. Lets see if we can get some input there. https://developer.walmart.com/forums/index.php/forums/error-gmp_gateway_api-while-trying-to

Thanks again for all your help.

roman-shuhov commented 5 years ago

Thank you, looks like they fixed an issue in the API. Closing it for now, but feel free to re-open it if issue still persists.

JaimeRodriguezV commented 5 years ago

Hi guys, did you manage to solve this issue? I am also using the .Net SDK to try to acknowledge my orders but as you can see in the attached image, trying to run: task.Wait(); (line 67), it raises the mentioned error: API Error Occured [500 Internal Server Error] [ERROR] - SYSTEM_ERROR.GMP_GATEWAY_API;

No luck with Walmart support team, so any help will be appreciated.

issueack2

bikram-bikram commented 5 years ago

The SDK did not work for us for acknowledge, and as you can see in the other open tickets (one of them opened by us), that Walmart is no longer going to support this "digital signature" based method, and wants us to move to "access token" based method. And this SDK has no immediate plans for implementing that access token method. So, we went ahead and implemented the access token on our own, without using the SDK. And using that, the acknowledge worked successfully.

deadheroX2 commented 5 years ago

walmart sdk missing "content-type:application/json" , add in header will be ok.

you can add this code before post to walmart.

//------------------ var httpContent = new StringContent("{}", Encoding.UTF8); httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); request.HttpRequest.Content = httpContent; //---------------------- 20190423133441

pedrohma commented 5 years ago

walmart sdk missing "content-type:application/json" , add in header will be ok.

you can add this code before post to walmart.

//------------------ var httpContent = new StringContent("{}", Encoding.UTF8); httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); request.HttpRequest.Content = httpContent; //---------------------- 20190423133441

This worked for me! :)