public static StripeChargeCreateOptions InvalidCard()
        {
            var cardOptions = new StripeSourceOptions()
            {
                AddressCountry = "US",
                AddressLine1 = "24 Poopie St",
                AddressCity = "Yeehaw Beebop ChickyChicky",
                AddressState = "NC",
                AddressZip = "90210",
                Cvc = "1223",
                ExpirationMonth = "10",
                ExpirationYear = "2004",
                Name = "Joe Meatballs",
                Number = "425221"
            };

            return new StripeChargeCreateOptions()
            {
                Source = cardOptions,
                Description = "Joe Meatball Charge",
                StatementDescriptor = "Joe Meatball Sub",
                Amount = 5153,
                Currency = "usd"
            };
        }
        public static StripeChargeCreateOptions ValidCard()
        {
            var cardOptions = new StripeSourceOptions()
            {
                AddressCountry = "US",
                AddressLine1 = "24 Beef Flank St",
                AddressLine2 = "Apt 24",
                AddressCity = "BIGGIE",
                AddressState = "NC",
                AddressZip = "27617",
                Cvc = "1223",
                ExpirationMonth = "10",
                ExpirationYear = "2021",
                Name = "Joe Meatballs",
                Number = "4000000000000077",
            };

            return new StripeChargeCreateOptions()
            {
                Source = cardOptions,
                Description = "Joe Meatball Charge",
                StatementDescriptor = "Joe Meatball Sub",
                Amount = 5153,
                Currency = "usd",
                Metadata = new Dictionary<string, string>
                {
                    { "A", "Value-A" },
                    { "B", "Value-B" }
                }
            };
        }
Beispiel #3
0
        public static StripeChargeCreateOptions InvalidCard()
        {
            var cardOptions = new StripeSourceOptions()
            {
                AddressCountry  = "US",
                AddressLine1    = "24 Poopie St",
                AddressCity     = "Yeehaw Beebop ChickyChicky",
                AddressState    = "NC",
                AddressZip      = "90210",
                Cvc             = "1223",
                ExpirationMonth = "10",
                ExpirationYear  = "2004",
                Name            = "Joe Meatballs",
                Number          = "425221"
            };

            return(new StripeChargeCreateOptions()
            {
                Source = cardOptions,
                Description = "Joe Meatball Charge",
                StatementDescriptor = "Joe Meatball Sub",
                Amount = 5153,
                Currency = "usd"
            });
        }
Beispiel #4
0
        public static StripeChargeCreateOptions ValidCard()
        {
            var cardOptions = new StripeSourceOptions()
            {
                AddressCountry  = "US",
                AddressLine1    = "24 Beef Flank St",
                AddressLine2    = "Apt 24",
                AddressCity     = "BIGGIE",
                AddressState    = "NC",
                AddressZip      = "27617",
                Cvc             = "1223",
                ExpirationMonth = "10",
                ExpirationYear  = "2021",
                Name            = "Joe Meatballs",
                Number          = "4000000000000077",
            };

            return(new StripeChargeCreateOptions()
            {
                Source = cardOptions,
                Description = "Joe Meatball Charge",
                StatementDescriptor = "Joe Meatball Sub",
                Amount = 5153,
                Currency = "usd",
                Metadata = new Dictionary <string, string>
                {
                    { "A", "Value-A" },
                    { "B", "Value-B" }
                }
            });
        }
        public static StripeCustomerCreateOptions ValidCard(string _planId = null, string _couponId = null, DateTime?_trialEnd = null)
        {
            var cardOptions = new StripeSourceOptions()
            {
                Object          = "card",
                AddressCountry  = "US",
                AddressLine1    = "234 Bacon St",
                AddressLine2    = "Apt 1",
                AddressState    = "NC",
                AddressZip      = "27617",
                Cvc             = "1661",
                ExpirationMonth = "10",
                ExpirationYear  = "2021",
                Name            = "Johnny Tenderloin",
                Number          = "4242424242424242",
            };

            var stripeCustomerCreateOptions = new StripeCustomerCreateOptions()
            {
                Source         = cardOptions,
                Email          = "*****@*****.**",
                Description    = "Johnny Tenderloin ([email protected])",
                AccountBalance = 100,
                Metadata       = new Dictionary <string, string>
                {
                    { "A", "Value-A" },
                    { "B", "Value-B" }
                }
            };

            if (_planId != null)
            {
                stripeCustomerCreateOptions.PlanId = _planId;
            }

            if (_couponId != null)
            {
                stripeCustomerCreateOptions.CouponId = _couponId;
            }

            if (_trialEnd != null)
            {
                stripeCustomerCreateOptions.TrialEnd = _trialEnd;
            }

            return(stripeCustomerCreateOptions);
        }
        public static StripeCustomerCreateOptions ValidCard(string _planId = null, string _couponId = null, DateTime? _trialEnd = null, bool _trialEndNow = false)
        {
            var cardOptions = new StripeSourceOptions()
            {
                Object = "card",
                AddressCountry = "US",
                AddressLine1 = "234 Bacon St",
                AddressLine2 = "Apt 1",
                AddressState = "NC",
                AddressZip = "27617",
                Cvc = "1661",
                ExpirationMonth = "10",
                ExpirationYear = "2021",
                Name = "Johnny Tenderloin",
                Number = "4242424242424242",
            };

            var stripeCustomerCreateOptions = new StripeCustomerCreateOptions()
            {
                Source = cardOptions,
                Email = "*****@*****.**",
                Description = "Johnny Tenderloin ([email protected])",
                AccountBalance = 100,
                Metadata = new Dictionary<string, string>
                {
                    { "A", "Value-A" },
                    { "B", "Value-B" }
                }
            };

            if (_planId != null)
                stripeCustomerCreateOptions.PlanId = _planId;

            if (_couponId != null)
                stripeCustomerCreateOptions.CouponId = _couponId;

            if (_trialEndNow)
                stripeCustomerCreateOptions.EndTrialNow = true;
            else if (_trialEnd != null)
                stripeCustomerCreateOptions.TrialEnd = _trialEnd;

            return stripeCustomerCreateOptions;
        }