public static string UpdateConnectedAccount(string stripeId, BillingInfoModel model, Models.User.UserInfoModel userDetail) { //var stripeKey = StripeApiKey(); //StripeConfiguration.ApiKey = "sk_test_51HqZBDLnFgPc5G9BeuyG5lXc32mkG8Hijz01tGKSD6c5ChKpWHSARtJ49yNv75GXY3AbAINw08N8kA1VkvwZtONW00o0QdHxLp"; var stripeKey = StripeApiKey(); var options = new AccountUpdateOptions { BusinessProfile = new AccountBusinessProfileOptions { Url = "http://viralad.tourtech.co.il/", Name = "affiliate", Mcc = "7311" }, Capabilities = new AccountCapabilitiesOptions { CardPayments = new AccountCapabilitiesCardPaymentsOptions { Requested = true, }, Transfers = new AccountCapabilitiesTransfersOptions { Requested = true, }, }, ExternalAccount = new AccountBankAccountOptions() { AccountHolderName = model.AccountHolderName, AccountHolderType = "individual", AccountNumber = model.AccountNumber, Country = "US", Currency = "usd", RoutingNumber = model.RoutingNumber, }, BusinessType = "individual", Email = userDetail.Email, Individual = new AccountIndividualOptions() { FirstName = userDetail.FirstName, LastName = userDetail.LastName, Dob = new DobOptions() //test dub 1901-01-01 { Day = 1, //long.Parse(userDetail.DateOfBirth.Day.ToString()), Month = 1, //long.Parse(userDetail.DateOfBirth.Month.ToString()), Year = 1901 //long.Parse(userDetail.DateOfBirth.Year.ToString()) }, SsnLast4 = model.SsnLast4, IdNumber = model.IdNumber, Phone = model.Phone, Address = new AddressOptions { State = "Alabama", Country = "us", City = "Moody", Line1 = "address_full_match", PostalCode = "35004" }, Email = model.Email }, TosAcceptance = new AccountTosAcceptanceOptions { Date = DateTime.UtcNow, Ip = "127.0.0.1", // provide request's IP address }, }; var service = new AccountService(); var account = service.Update(stripeId, options); return(account.Id);//this is connectedStripeAccountId }
public static string CreateConnectedAccount(BillingInfoModel model, Models.User.UserInfoModel userDetail) { //var stripeKey = StripeApiKey(); var stripeKey = StripeApiKey(); var options = new AccountCreateOptions { Type = "custom", BusinessProfile = new AccountBusinessProfileOptions { Url = "http://viralad.tourtech.co.il/", Name = "affiliate", Mcc = "7311" }, Capabilities = new AccountCapabilitiesOptions { CardPayments = new AccountCapabilitiesCardPaymentsOptions { Requested = true, }, Transfers = new AccountCapabilitiesTransfersOptions { Requested = true, }, }, ExternalAccount = new AccountBankAccountOptions() { AccountHolderName = model.AccountHolderName, AccountHolderType = "individual", AccountNumber = model.AccountNumber, Country = "US", Currency = "usd", RoutingNumber = model.RoutingNumber, }, BusinessType = "individual", Email = userDetail.Email, Individual = new AccountIndividualOptions() { FirstName = userDetail.FirstName, LastName = userDetail.LastName, Dob = new DobOptions() //test d0b 1901-01-01 { Day = 1, //long.Parse(userDetail.DateOfBirth.Day.ToString()), Month = 1, //long.Parse(userDetail.DateOfBirth.Month.ToString()), Year = 1901 //long.Parse(userDetail.DateOfBirth.Year.ToString()) }, SsnLast4 = model.SsnLast4, IdNumber = model.IdNumber, Phone = "000 000 0000",//userDetail.Phone, Address = new AddressOptions { State = "Alabama", Country = "us", City = "Moody", Line1 = "address_full_match", PostalCode = "35004" }, Email = userDetail.Email }, TosAcceptance = new AccountTosAcceptanceOptions { Date = DateTime.UtcNow, Ip = "127.0.0.1", // provide request's IP address }, }; var service = new AccountService(); var account = service.Create(options); return(account.Id);//this is connectedStripeAccountId }