Web API (official plugin)

2 anni tempo fa
DmitriyKulagin wrote:
Hi, robjicom.
This is a known issue, please check the version of Microsoft.AspNetCore.Authentication.JwtBearer library in the NuGet package manager, it should be 5.0.13. If it is not, update it to the specified version.


The latest stable version is 6.0.1. Is that okay to use?
2 anni tempo fa
Linden wrote:
The latest stable version is 6.0.1. Is that okay to use?

We only tested the Web API on version 5.0.13, you can try installing a newer version. If you run into problems, you can always revert to the recommended build.
2 anni tempo fa
DmitriyKulagin wrote:
Hi, robjicom.
This is a known issue, please check the version of Microsoft.AspNetCore.Authentication.JwtBearer library in the NuGet package manager, it should be 5.0.13. If it is not, update it to the specified version.
As soon as I install the Backend API, the /api-frontend/index.html does not display properly, and shows several resources as 404.  However, the /api-backend/index.html works fine.  If I uninstall the Backend API, the /api-frontend/index.html again works as expected.


I verified that both plugins were using the 5.0.13 version of the Microsoft.AspNetCore.Authentication.JwtBearer.dll.  I uninstalled both API plugins, re-installed the front-end plugin, reset the application.  Re-installed the back-end plugin, reset the application.  Everything seems to be working as expected now.
2 anni tempo fa
hi
Has this project rewritten service layers and controllers?
2 anni tempo fa
I would like to send the PDF of the invoice generated in the ERP to the original NopCommerce order so that the user can download the invoice generated by the ERP.

Flow summary :
Order (NOP)  >>  API (get order) >>   ERP  >>  API ( post PDF Invoice ) >>  Order Detail ( download PDF Invoice generated by ERP )

Can I do it through the standard APIs or is customization necessary?
2 anni tempo fa
Hi, Elicat. I'm sorry, but this can't be done through the WebApi plugin because on the Order Detail page (as well as in the GetPdfInvoice method of the API itself) Invoice is generated in memory and not read from disk

Elicat1 wrote:
I would like to send the PDF of the invoice generated in the ERP to the original NopCommerce order so that the user can download the invoice generated by the ERP.

Flow summary :
Order (NOP)  >>  API (get order) >>   ERP  >>  API ( post PDF Invoice ) >>  Order Detail ( download PDF Invoice generated by ERP )

Can I do it through the standard APIs or is customization necessary?
2 anni tempo fa
I have purchased this plugin and i am using this plugin to use in interacting with my mobile app.
Unfortunately, it have some problems right now.
I.e. I wanted to get the most popular products using API of this plugin.
But, i don't know how to implement it.
Also, each time registering the customer, it has response with status 302 code, so i can't proceed next operation.
I.e. after success with register, going to home screen, etc.
it always stays in error exception.
Anyone can help me?
I would appreciate it if all of your guys could let me know about it.
Thanks.
1 anno tempo fa
Hello,

I try to access WebApi.Front swagger by this link {URL}/api-frontend/index.html
it gives me a white page with this error in the console tab
Uncaught ReferenceError: SwaggerUIBundle is not defined

Any one can help
Thanks
1 anno tempo fa
Apologies if this was asked before-

It seems like the ErrorMiddleware of the API plugins is intercepting the normal error handling behavior of the webstore, causing a JSON error to be shown to web users in the case of 500 errors instead of the normal content of ErrorPage.htm from the ErrorController/Error method.

Is there a way to restrict the JSON error handling middleware to methods of the API plugin only so users see a more useful error page when they're browsing the webstore and only API users receive the JSON errors?
1 anno tempo fa
Yes, it seems that the problem really exists, we will try to solve it in the next update, but for now, as a temporary solution, you can add the following code to line 34 of the ErrorHandlerMiddleware class:

if (!(context.Request.Path.Value?.StartsWith("/api-") ?? false))
    throw;


EmpireRich wrote:
Apologies if this was asked before-

It seems like the ErrorMiddleware of the API plugins is intercepting the normal error handling behavior of the webstore, causing a JSON error to be shown to web users in the case of 500 errors instead of the normal content of ErrorPage.htm from the ErrorController/Error method.

Is there a way to restrict the JSON error handling middleware to methods of the API plugin only so users see a more useful error page when they're browsing the webstore and only API users receive the JSON errors?