Example #1
0
        public sources_fixture()
        {
            SourceCreateOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.AchCreditTransfer,
                Currency = "usd",
                Owner    = new StripeSourceOwner
                {
                    Email      = "*****@*****.**",
                    CityOrTown = "Mayberry",
                    State      = "NC"
                }
            };

            SourceUpdateOptions = new StripeSourceUpdateOptions
            {
                Owner = new StripeSourceOwner
                {
                    Email = "*****@*****.**"
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            Source          = service.Create(SourceCreateOptions);
            SourceUpdated   = service.Update(Source.Id, SourceUpdateOptions);
            SourceRetrieved = service.Get(Source.Id);
        }
Example #2
0
        public sources_fixture()
        {
            SourceCreateOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.Bitcoin,
                Amount   = 1,
                Currency = "usd",
                Owner    = new StripeSourceOwner
                {
                    Email      = "*****@*****.**",
                    CityOrTown = "Mayberry",
                    State      = "NC"
                }
            };

            SourceUpdateOptions = new StripeSourceUpdateOptions
            {
                Owner = new StripeSourceOwner
                {
                    Email = "*****@*****.**"
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            Source          = service.Create(SourceCreateOptions);
            SourceUpdated   = service.Update(Source.Id, SourceUpdateOptions);
            SourceRetrieved = service.Get(Source.Id);
        }
Example #3
0
        public creating_and_updating_card_source()
        {
            SourceCardCreateOptions = new StripeSourceCreateOptions
            {
                Type  = StripeSourceType.Card,
                Token = "tok_visa"
            };

            SourceCardUpdateOptions = new StripeSourceUpdateOptions
            {
                Card = new StripeSourceCardUpdateOptions
                {
                    ExpirationMonth = 12,
                    ExpirationYear  = 2028
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            SourceCard        = service.Create(SourceCardCreateOptions);
            SourceCardUpdated = service.Update(SourceCard.Id, SourceCardUpdateOptions);
        }