我正在尝试开发我的第一个适用于transactions
和的 AoG 动作order
。为此,在实现代码中,我使用了https://developers.google.com/actions/transactions/physical/dev-guide-physical-reservations#troubleshooting中的Build reservations中node.js
所示的确切代码。
在我的履行中,我使用了2.下的选项卡order
上显示的对象。构建订单( https://developers.google.com/actions/transactions/physical/dev-guide-physical-reservations#fulfillment_2 )
和代码3.下的实例。提出订单(https://developers.google.com/actions/transactions/physical/dev-guide-physical-reservations#fulfillment_3)Node.js
TransactionDecision
然后我使用以下代码生成响应:
const order = ... // from 'Build the order'
let td = new TransactionDecision({
orderOptions: {
requestDeliveryAddress: 'false',
},
presentationOptions: {
actionDisplayName: 'RESERVE',
},
order: order
});
conv.ask(td);
当我尝试在 Google 操作控制台上的操作中对此进行测试时,我在日志中收到以下错误消息:
{
insertId: "63wrc8fa8xoge"
labels: {…}
logName: "projects/...."
receiveTimestamp: "2019-09-24T12:39:19.247945401Z"
resource: {…}
severity: "ERROR"
textPayload: "UnparseableJsonResponse: API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: "order: Cannot find field." HTTP Status Code: 200"
timestamp: "2019-09-24T12:39:19.240171706Z"
trace: "projects/84695521529/traces/ABwppHH_pPd9tThUe9Deu_8jeEcTN_-YcXX-57ciimLmrafv11ERv4dNRNb1Ka2W5r-LM2EjKNZny0tX_1FbgzE"
}
谁能告诉我我做错了什么?我正在使用actionsdk:
const app = actionssdk();
app.ordersv3 = true;
亲切的问候,
约翰普尔