0

Since 2 weeks I trying to figure out how the Transaction Requirement Check is working. I copy pasted exactely the same exemple you have provided in the documentation which is this one :

app.intent('verify_transaction_requirements', (conv) => {
  console.log("am I entering in this intent ?");
  conv.ask(new TransactionRequirements({
         orderOptions: {
          requestDeliveryAddress: false,
    },
    paymentOptions: {
      googleProvidedOptions: {
        prepaidCardDisallowed: false,
        supportedCardNetworks: ['VISA', 'AMEX'],
        // These will be provided by payment processor,
        // like Stripe, Braintree, or Vantiv.
        tokenizationParameters: {}
      }
    }
  }));
});

When trying this bit of code on my mobile phone, I am receiving an error saying that my application is not responding anymore. How error, looking at the log, my Google Function seems to send a 200 status code. No error has been printed at all. I have also enabled the transactions on Google Action Console.

Do you have an idea about where the problem could come from ?

Regards,

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
Freezer freezer
  • 120
  • 1
  • 3
  • 13

1 Answers1

0

I believe the issue is because the tokenizationParameters field is empty, but it expecting some data.

Try using placeholder information in it's place, or setting up a sandbox payment processor using Stripe or Braintree:

tokenizationParameters: {
    tokenizationType: 'PAYMENT_GATEWAY',
    parameters: {
        "gateway": 'stripe',
        "stripe:publishableKey" : "pk_1234",
        "stripe:version" : "1.5"     
    }
},
Taylor Caldwell
  • 381
  • 2
  • 7