Ejemplo n.º 1
0
    static void Main()
    {
        var response = new VoiceResponse();
        var pay      = new Pay();
        var prompt   = new Prompt(attempt: new [] { 1 }.ToList(), for_: "expiration-date");

        prompt.Say("Please enter your expiration date, two digits for the month and two digits for the year.");
        pay.Append(prompt);
        var prompt2 = new Prompt(attempt: new [] { 2, 3 }.ToList(), for_: "expiration-date");

        prompt2.Say("Please enter your expiration date, two digits for the month and two digits for the year. For example, if your expiration date is March 2022, then please enter 0 3 2 2");
        pay.Append(prompt2);
        response.Append(pay);

        System.Console.WriteLine(response.ToString());
    }
Ejemplo n.º 2
0
    static void Main()
    {
        var response = new VoiceResponse();
        var pay      = new Pay();
        var prompt   = new Prompt(cardType: new [] { Prompt.CardTypeEnum.Visa }.ToList(), for_: "security-code");

        prompt.Say("Please enter security code for your Visa card. It’s the 3 digits located on the back of your card");
        pay.Append(prompt);
        response.Append(pay);

        System.Console.WriteLine(response.ToString());
    }
Ejemplo n.º 3
0
    static void Main()
    {
        var response = new VoiceResponse();
        var pay      = new Pay();
        var prompt   = new Prompt(for_: "payment-card-number");

        prompt.Say("Please enter your 15 digit Visa or Mastercard number.");
        pay.Append(prompt);
        response.Append(pay);

        System.Console.WriteLine(response.ToString());
    }
Ejemplo n.º 4
0
    static void Main()
    {
        var response = new VoiceResponse();
        var pay      = new Pay();
        var prompt   = new Prompt(for_: "payment-card-number");

        prompt.Play(new Uri("https://myurl.com/twilio/twiml/audio/card_number.mp3"));
        pay.Append(prompt);
        response.Append(pay);

        System.Console.WriteLine(response.ToString());
    }
Ejemplo n.º 5
0
    static void Main()
    {
        var response = new VoiceResponse();
        var pay      = new Pay();
        var prompt   = new Prompt(cardType: new [] { Prompt.CardTypeEnum.Amex }
                                  .ToList(), for_: "security-code");

        prompt
        .Say("Please enter security code for your American Express card. It’s the 4 digits located on the front of your card");
        pay.Append(prompt);
        response.Append(pay);

        Console.WriteLine(response.ToString());
    }