Hi
I'm writing a webservice as part of a hosted payment page solution for magento2
I need the web service to be called as part of the checkout process, after placeOrder.
I'm having problems getting control of the routing.
My initial url was within cart (rest/default/V1/carts/mine/myservice) , but that led to problems with the forced parameter card_id, and the fact the cart is cleared by placeOrder.
So I think I need the url to be in my own space, like rest/default/V1/hostedservice/myservice
I can't get this url to have a recognised route.
I've configured webapi.xml, the interface that implements the method to be called, and the corresponding class and method.
I'm unclear whether routes.xml should play a role in the solution...
Although my new url does not mention carts, somehow the stack ends up at
/var/www/html/magento/generated/code/Magento/Quote/Model/Webapi/ParamOverriderCartId/Proxy.php
which causes a 404
I'm about to start debugging /var/www/html/magento/vendor/magento/module-webapi/Controller/Rest.php
Hopefully someone can save me from that pain.
Thanks
Martin