Exemplo n.º 1
0
        public Stripe.PaymentIntent CreatePaymentIntent(Stripe.PaymentIntentCreateOptions options)
        {
            var service       = new Stripe.PaymentIntentService();
            var paymentIntent = service.Create(options);

            return(paymentIntent);
        }
Exemplo n.º 2
0
        public Stripe.PaymentIntent CreatePaymentIntent(int orderId, long centAmount)
        {
            var options = new Stripe.PaymentIntentCreateOptions
            {
                Amount   = centAmount,
                Currency = "usd",
                Metadata = new Dictionary <string, string>
                {
                    { "orderId", orderId.ToString() },
                },
            };

            var service       = new Stripe.PaymentIntentService();
            var paymentIntent = service.Create(options);

            return(paymentIntent);
        }