我正在使用 Web 服务 API 进行 MICROS RES 3700 POS 集成。 我已经可以下简单的订单了,但我无法让调味品发挥作用。
POS 只是忽略我随 MenuItem 发送的调味品数组。有人可以向我展示 XML 调味品数组结构的示例吗?文档说它与 MeuItem 的结构相同,但它不起作用。
谢谢!
最佳答案
我意识到这个问题很老了,但它与我非常相关,我希望将来可以帮助其他开发人员。
The POS just ignores the condiment array i send with the MenuItem.
确保您发送的调味品已配置为 Micros 3700 内的调味品。
I am already able to place simple orders but I couldn't make the condiments work.
我认为这是更有趣的问题 - (尽管肯定与我更相关,以及我是如何偶然发现这个线程的)。
我的问题略有不同,因为提供调味品会导致 ResPosApiWeb 服务中出现未处理的异常。
我怀疑是因为 ResPosApiWeb.dll 包装了 Interop.ResPosApi.dll,所以非托管代码是发生问题的地方。我使用 dotPeek 来研究 ResPosApiWeb.dll,该理论得到了进一步的支持。
请参阅下面的代码示例,了解针对请求构建的有效菜单:
var menuItems = new ResPosAPI_MenuItem[]
{
new ResPosAPI_MenuItem()
{
MenuItem = new ResPosAPI_MenuItemDefinition
{
MiObjectNum = 123,
MiMenuLevel = 1,
MiOverridePrice = "10.00", // optional
MiWeight = "1", // optional
MiReference = "", // optional
ItemDiscount = new ResPosAPI_Discount()
},
Condiments = new ResPosAPI_MenuItemDefinition[]
{
new ResPosAPI_MenuItemDefinition()
{
MiObjectNum = 456,
MiMenuLevel = 1,
MiOverridePrice = "1.00", // optional
MiWeight = "1", // optional
MiReference = "", // IMPORTANT: MiReference *must* be defined on Condiments, for some reason, or it will result in an unhandled exception in the ResPosApi web service
ItemDiscount = new ResPosAPI_Discount()
}
}
}
};
然后使用其他所需参数发出请求...
_apiClient.CalculateTransactionTotals(
ppMenuItems: ref menuItems, // our menu object we created above
ppComboMeals: ref comboMeals,
pSvcCharge: ref serviceCharge,
pSubtotalDiscount: ref discount,
revenueCenter: _revenueCenterId,
orderType: _orderTypeId,
employeeNumber: _employeeId,
pTotalsResponse: ref totalsResponse);
关于xml - MICROS RES 3700 POS 集成 - 下订单调味品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32871669/