ReceiptItem 中缺少 properties/methods
Missing properties/methods in ReceiptItem
我使用 MS BotFramework 创建了一个简单的机器人,它已启用以下渠道:WebChat、Skype 和 脸书.
该机器人允许用户select或搜索一些产品以添加到订单中,问题是关于在创建收据时传递给收据的属性。
根据Facebook Docs: Receipt Template, it accepts the currency, payment_method and some other properties, but I can't find them in the MS BotFramework Docs: ReceiptItem。
有什么方法可以添加这个属性?
ReceiptItem
将成为 ReceiptCard. The ReceiptCard
also have a collection of facts 的项目,这是向用户显示其他内容的地方,例如 payment_method.
Here 是如何使用 facts
集合的示例:
var receiptCard = new ReceiptCard
{
Title = Resources.RootDialog_Receipt_Title,
Facts = new List<Fact>
{
new Fact(Resources.RootDialog_Receipt_OrderID, order.OrderID),
new Fact(Resources.RootDialog_Receipt_PaymentMethod, creditCardOffuscated)
},
Items = new List<ReceiptItem>
{
new ReceiptItem(
title: order.FlowerCategoryName,
subtitle: order.Bouquet.Name,
price: order.Bouquet.Price.ToString("C"),
image: new CardImage(order.Bouquet.ImageUrl)),
},
Total = order.Bouquet.Price.ToString("C")
};
以防万一,这里是相同的,但 C#
。
我使用 MS BotFramework 创建了一个简单的机器人,它已启用以下渠道:WebChat、Skype 和 脸书.
该机器人允许用户select或搜索一些产品以添加到订单中,问题是关于在创建收据时传递给收据的属性。
根据Facebook Docs: Receipt Template, it accepts the currency, payment_method and some other properties, but I can't find them in the MS BotFramework Docs: ReceiptItem。
有什么方法可以添加这个属性?
ReceiptItem
将成为 ReceiptCard. The ReceiptCard
also have a collection of facts 的项目,这是向用户显示其他内容的地方,例如 payment_method.
Here 是如何使用 facts
集合的示例:
var receiptCard = new ReceiptCard
{
Title = Resources.RootDialog_Receipt_Title,
Facts = new List<Fact>
{
new Fact(Resources.RootDialog_Receipt_OrderID, order.OrderID),
new Fact(Resources.RootDialog_Receipt_PaymentMethod, creditCardOffuscated)
},
Items = new List<ReceiptItem>
{
new ReceiptItem(
title: order.FlowerCategoryName,
subtitle: order.Bouquet.Name,
price: order.Bouquet.Price.ToString("C"),
image: new CardImage(order.Bouquet.ImageUrl)),
},
Total = order.Bouquet.Price.ToString("C")
};
以防万一,这里是相同的,但 C#
。