访客结账是一种允许用户通过以下方式向合作伙伴下单的 Google,无论他们是否登录了 Google 账号。
为了确定用户的订单是以访客身份提交,还是通过访客身份登录
Google 账号,请查看emailVerified
字段
finalOrder.cart.extension.contact
在
SubmitOrderRequestMessage
。
用户登录 Google 账号所下订单将有 emailVerified
。
则设为 true,而访客用户的订单则不会显示 emailVerified
。
访客订单
{ "finalOrder": { ... "cart": { ... "extension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodItemExtension", "contact": { "displayName": "Lovefood Ordering", "email": "ilovefood@example.com", "phoneNumber": "+16501234567", "firstName": "Lovefood", "lastName": "Ordering" } } } } }
已登录订单
{ "finalOrder": { ... "cart": { ... "extension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodItemExtension", "contact": { "displayName": "Lovefood Ordering", "email": "ilovefood@example.com", "phoneNumber": "+16501234567", "firstName": "Lovefood", "lastName": "Ordering", "emailVerified": true } } } } }