public override StripeSource Create(StripeSettings stripeSettings, FirstPaymentData data) { var source = new StripeSourceService(stripeSettings.StripePrivateKey).Create(new StripeSourceCreateOptions { Type = StripeSourceType.Bancontact, Amount = data.Amount, Currency = data.Currency, Owner = new StripeSourceOwner { Name = data.OwnerName }, RedirectReturnUrl = data.RedirectReturnUrl, Metadata = data.Metadata }); return(source); }
public static PaymentSourceCreator Build(FirstPaymentData data) { if ("BE".Equals(data.CountryCode?.ToUpperInvariant())) { return(new BePaymentSource()); } if ("DE".Equals(data.CountryCode?.ToUpperInvariant())) { return(new DePaymentSource()); } if ("NL".Equals(data.CountryCode?.ToUpperInvariant())) { return(new NlPaymentSource()); } // sofort as default first payment for now // country supported: Austria, Spain return(new OtherEuropePaymentSource()); }
public override StripeSource Create(StripeSettings stripeSettings, FirstPaymentData data) { var source = new StripeSourceService(stripeSettings.StripePrivateKey).Create(new StripeSourceCreateOptions { Type = StripeSourceType.Sofort, Amount = data.Amount, Currency = data.Currency, Owner = new StripeSourceOwner { Name = data.OwnerName }, RedirectReturnUrl = data.RedirectReturnUrl, SofortCountry = data.CountryCode, SofortStatementDescriptor = "", // define statement description Metadata = data.Metadata }); return(source); }
public abstract StripeSource Create(StripeSettings stripeSettings, FirstPaymentData data);