我正在使用Transactions API开发基于Google Pay的对话流聊天机器人。 但是我总是在说“用Google付款检查交易”时收到以下错误:
“代理返回了一个空的TTS”
按照本教程操作:https://github.com/actions-on-google/dialogflow-transactions-nodejs
这是我正在使用的代码:
app.intent('transaction_check_google', (conv) => {
conv.ask(new TransactionRequirements({
orderOptions: {
requestDeliveryAddress: false,
},
paymentOptions: {
googleProvidedOptions: {
prepaidCardDisallowed: false,
supportedCardNetworks: ['VISA', 'AMEX'],
// Tokenization parameter data will be provided by
// a payment processor, like Stripe, Braintree, or Vantiv.
// Below are placeholder parameters for Braintree.
tokenizationParameters: {
parameters: {
"gateway": "stripe",
"stripe:publishableKey": '<Stripe_pk>',
"stripe:version": "2018-09-24"
},
tokenizationType: 'PAYMENT_GATEWAY',
},
},
},
}));
});