Web API (official plugin)

1 year ago
HakonMM wrote:
Should I delete the folder manually, and then try to install the plugin "the normal way" using the admin pages?

Yes, please try
1 year ago
a.m. wrote:
Should I delete the folder manually, and then try to install the plugin "the normal way" using the admin pages?
Yes, please try


Thank you again for your quick reply. :-)
I tried to delete the directory, but it still doesn't work.  :-(
It's very strange. Backend API installation worked as normal, but Frontend API installation does not work! I have tried multiple times now.
What can I do now?
(Extra information: The database has been upgraded from 4.2 to 4.5, but I have had no problems after the upgrade.)

Kind regards,
Håkon
1 year ago
HakonMM wrote:
What can I do now?

I've just sent you an email with suggestion. Please check
1 year ago
Hy at all.
We are implementing a simple APP in Flutter connected to the site with WEB API.
On the checkout process we are arrived to the "paymentinfo" step....
We receive our payment methods, PayPalCommerce and CheckMoneyOrder.
We choose PayPalCommerce and we confirm with SelectPaymentMethod, then we go to PaymentInfo.
And now??? we receive the indication to use the PayPalCommercePaymentInfo view..... but how we must do this in our app???

Thanks in advance...
1 year ago
NOP Version 4.50.3 API version 4.50.9
Another question regarding API and checkout.
We make the subsequent call chain to complete the checkout:
- Checkout/index
- Checkout/SelectBillingAddress
- Checkout/ShippingMethod
- Checkout/SelectShippingMethod
- Checkout/PaymentMethod
- Checkout/SlectPaymentMethod
- Checkout/PaymentInfo
- Checkout/EnterPaymentInfo
- Checkout/Confirm
- Checkout/ConfirmOrder

All works until the last call... but at the end we receive the warning: "Shipping total couldn't be calculated" and the order will not be confirmed.
(trying this with 4.50.4 we have the order confirmed, but seeing in the order details we have no shipping method selected)

Debugging the website we can see that in the OrderProcessingService.PreparePlaceOrderDetailsAsync we call the following code:

var shippingOption = await _genericAttributeService.GetAttributeAsync<ShippingOption>(details.Customer, NopCustomerDefaults.SelectedShippingOptionAttribute, processPaymentRequest.StoreId);

Debugging this function we can see that the customer attribute SelectedShippingOption is populated with a value that is different of the one we have when we make the checkout from the website....

We suppose that we could be in wrong with the way to call the Checkout/SelectShippingMethod API.
At the moment we are passing "shippingOption" query paramenter (with this value: Next Day Air___Shipping.FixedByWeightByTotal) and this in the body: {
    "shippingoption":"Ground___Shipping.FixedByWeightByTotal",
    "nextstep":""
}

is this the error???
1 year ago
Is there any way we can call the api from within a plugin?
1 year ago
You can access WebApi both from the plugin and not from the plugin using the same methods. for example, if you need to make one or two calls, then you can use the methods provided by the HttpClient class

jjcowo wrote:
Is there any way we can call the api from within a plugin?
1 year ago
No one responding to this.... sorry guys.... we have payed for the API.... the swagger hub documentation tell us how many calls exist and the parameter... but no infos on what is mandatory and what procedure follow to use them... is a little confusing without any help....

[email protected] wrote:
NOP Version 4.50.3 API version 4.50.9
Another question regarding API and checkout.
We make the subsequent call chain to complete the checkout:
- Checkout/index
- Checkout/SelectBillingAddress
- Checkout/ShippingMethod
- Checkout/SelectShippingMethod
- Checkout/PaymentMethod
- Checkout/SlectPaymentMethod
- Checkout/PaymentInfo
- Checkout/EnterPaymentInfo
- Checkout/Confirm
- Checkout/ConfirmOrder

All works until the last call... but at the end we receive the warning: "Shipping total couldn't be calculated" and the order will not be confirmed.
(trying this with 4.50.4 we have the order confirmed, but seeing in the order details we have no shipping method selected)

Debugging the website we can see that in the OrderProcessingService.PreparePlaceOrderDetailsAsync we call the following code:

var shippingOption = await _genericAttributeService.GetAttributeAsync<ShippingOption>(details.Customer, NopCustomerDefaults.SelectedShippingOptionAttribute, processPaymentRequest.StoreId);

Debugging this function we can see that the customer attribute SelectedShippingOption is populated with a value that is different of the one we have when we make the checkout from the website....

We suppose that we could be in wrong with the way to call the Checkout/SelectShippingMethod API.
At the moment we are passing "shippingOption" query paramenter (with this value: Next Day Air___Shipping.FixedByWeightByTotal) and this in the body: {
    "shippingoption":"Ground___Shipping.FixedByWeightByTotal",
    "nextstep":""
}

is this the error???
1 year ago
I'm sorry no one answered your question earlier. Unfortunately, I won’t help much either, because I don’t quite understand what kind of help you are waiting for. If you send the correct request to the server, it will be processed correctly. Try debugging through the entire checkout path, including making sure SelectShippingMethod is processing your data and saving it correctly. I would also like to note that we do not know how you pass data to EnterPaymentInfo and other calls. We are happy to help you identify specific method call issues, however, we cannot analyze your business solution as a whole.

Also, based on our development and the development of our partners, the current API does not allow to complete the order creating process without changes in the web API. We will add the necessary methods in future versions.

[email protected] wrote:
No one responding to this.... sorry guys.... we have payed for the API.... the swagger hub documentation tell us how many calls exist and the parameter... but no infos on what is mandatory and what procedure follow to use them... is a little confusing without any help....

NOP Version 4.50.3 API version 4.50.9
Another question regarding API and checkout.
We make the subsequent call chain to complete the checkout:
- Checkout/index
- Checkout/SelectBillingAddress
- Checkout/ShippingMethod
- Checkout/SelectShippingMethod
- Checkout/PaymentMethod
- Checkout/SlectPaymentMethod
- Checkout/PaymentInfo
- Checkout/EnterPaymentInfo
- Checkout/Confirm
- Checkout/ConfirmOrder

All works until the last call... but at the end we receive the warning: "Shipping total couldn't be calculated" and the order will not be confirmed.
(trying this with 4.50.4 we have the order confirmed, but seeing in the order details we have no shipping method selected)

Debugging the website we can see that in the OrderProcessingService.PreparePlaceOrderDetailsAsync we call the following code:

var shippingOption = await _genericAttributeService.GetAttributeAsync<ShippingOption>(details.Customer, NopCustomerDefaults.SelectedShippingOptionAttribute, processPaymentRequest.StoreId);

Debugging this function we can see that the customer attribute SelectedShippingOption is populated with a value that is different of the one we have when we make the checkout from the website....

We suppose that we could be in wrong with the way to call the Checkout/SelectShippingMethod API.
At the moment we are passing "shippingOption" query paramenter (with this value: Next Day Air___Shipping.FixedByWeightByTotal) and this in the body: {
    "shippingoption":"Ground___Shipping.FixedByWeightByTotal",
    "nextstep":""
}

is this the error???
1 year ago
Thanks for your reply Sergei.
In every step of the checkout we receive the OK, and the next step to execute.
And if we select something wrong we receive the same step as next, to replicate the step and correct the problem.
At the moment we have problem with the selectshippingmethod call... becaose it reply OK, and tell us to move to the next step (paymentmethod) but we find, debugging, that the data saved is not the same as we make the checkout process via web....

We think that we are missing something to pass... or we pass the data in the wrong way... but without any kind of documentation... how we can know what to pass???

Sergei-k wrote:
I'm sorry no one answered your question earlier. Unfortunately, I won’t help much either, because I don’t quite understand what kind of help you are waiting for. If you send the correct request to the server, it will be processed correctly. Try debugging through the entire checkout path, including making sure SelectShippingMethod is processing your data and saving it correctly. I would also like to note that we do not know how you pass data to EnterPaymentInfo and other calls. We are happy to help you identify specific method call issues, however, we cannot analyze your business solution as a whole.

Also, based on our development and the development of our partners, the current API does not allow to complete the order creating process without changes in the web API. We will add the necessary methods in future versions.

No one responding to this.... sorry guys.... we have payed for the API.... the swagger hub documentation tell us how many calls exist and the parameter... but no infos on what is mandatory and what procedure follow to use them... is a little confusing without any help....

NOP Version 4.50.3 API version 4.50.9
Another question regarding API and checkout.
We make the subsequent call chain to complete the checkout:
- Checkout/index
- Checkout/SelectBillingAddress
- Checkout/ShippingMethod
- Checkout/SelectShippingMethod
- Checkout/PaymentMethod
- Checkout/SlectPaymentMethod
- Checkout/PaymentInfo
- Checkout/EnterPaymentInfo
- Checkout/Confirm
- Checkout/ConfirmOrder

All works until the last call... but at the end we receive the warning: "Shipping total couldn't be calculated" and the order will not be confirmed.
(trying this with 4.50.4 we have the order confirmed, but seeing in the order details we have no shipping method selected)

Debugging the website we can see that in the OrderProcessingService.PreparePlaceOrderDetailsAsync we call the following code:

var shippingOption = await _genericAttributeService.GetAttributeAsync<ShippingOption>(details.Customer, NopCustomerDefaults.SelectedShippingOptionAttribute, processPaymentRequest.StoreId);

Debugging this function we can see that the customer attribute SelectedShippingOption is populated with a value that is different of the one we have when we make the checkout from the website....

We suppose that we could be in wrong with the way to call the Checkout/SelectShippingMethod API.
At the moment we are passing "shippingOption" query paramenter (with this value: Next Day Air___Shipping.FixedByWeightByTotal) and this in the body: {
    "shippingoption":"Ground___Shipping.FixedByWeightByTotal",
    "nextstep":""
}

is this the error???