欧元货币的交易API订单对象

时间:2020-07-07 10:01:22

标签: transactions actions-on-google

我正在尝试创建一个货币为EUR的购物车,但操作仍然崩溃。 这是我的样品订单对象

 "order": {
        "merchantOrderId": "rxhc",
        "createTime": "2020-07-07T09:11:19.906Z",
        "lastUpdateTime": "2020-07-07T09:11:19.906Z",
        "userVisibleOrderId": "rxhc",
        "contents": {
          "lineItems": [
            {
              "id": "yedf",
              "name": "USB cable",
              "priceAttributes": [
                {
                  "type": "REGULAR",
                  "name": "Item Price",
                  "state": "ACTUAL",
                  "amount": {
                    "currencyCode": "EUR",
                    "amountInMicros": 0
                  },
                  "taxIncluded": true
                },
                {
                  "type": "TOTAL",
                  "name": "Total Price",
                  "state": "ACTUAL",
                  "amount": {
                    "currencyCode": "EUR",
                    "amountInMicros": 0
                  },
                  "taxIncluded": true
                }
              ],
              "purchase": {
                "quantity": 1,
                "unitMeasure": {
                  "measure": 1,
                  "unit": "EUR"
                },
                "itemOptions": []
              }
            }
          ]
        }
      }

有人可以帮助我吗? 如果我将currencyCode更改为“ USD”,并将单位更改为“ POUND”,则效果很好。

1 个答案:

答案 0 :(得分:0)

我解决了删除unitMeasure对象并将currencyCode更改为“ EUR”的问题