Пример #1
0
        public void Initialize(StripeConfig stripeConfig)
        {
            if (_paymentContext != null)
            {
                return;
            }

            if (STPPaymentConfiguration.SharedConfiguration().PublishableKey == null)
            {
                STPPaymentConfiguration.SharedConfiguration().PublishableKey = stripeConfig.ApiKey;
            }

            var stripeRemoteService =
                new StripeRemoteService(stripeConfig, _restHttpClient, _logManager, _jsonSerializer);
            var provider        = new StripeEphemeralKeyProvider(stripeRemoteService, _logManager);
            var customerContext = new CustomerContext(provider, stripeRemoteService);

            _paymentContext = new STPPaymentContext(
                customerContext,
                STPPaymentConfiguration.SharedConfiguration(),
                STPTheme.DefaultTheme)
            {
                HostViewController = _getUiViewControllerFunc(),
                Delegate           = new PaymentDelegate(_messageHub, stripeRemoteService)
            };
        }
Пример #2
0
 public PurchaseConfig(
     string defaultCountry,
     string defaultPurchaseId,
     StripeConfig stripeConfig
     )
 {
     this.defaultCountry    = defaultCountry;
     this.defaultPurchaseId = defaultPurchaseId;
     this.stripeConfig      = stripeConfig;
 }
Пример #3
0
 public StripeHelper(StripeConfig stripeConfig = null)
 {
     stripeConfig = new StripeConfig
     {
         SecretKey      = "",
         PublishableKey = ""
     };
     StripeConfig = stripeConfig;
     StripeConfiguration.ApiKey = StripeConfig.SecretKey;
 }
Пример #4
0
        public SiteContext()
        {
            Auth = new AuthConfig();
            LocalAuth = new LocalAuthConfig();
            Stripe = new StripeConfig();
            Email = new EmailConfig();
            Membership = new MembershipConfig();
            Paging = new PagingConfig();

            ConfigurationBuilder.LoadConfiguration(this);
        }
Пример #5
0
        public SiteContext()
        {
            Auth       = new AuthConfig();
            LocalAuth  = new LocalAuthConfig();
            Stripe     = new StripeConfig();
            Email      = new EmailConfig();
            Membership = new MembershipConfig();
            Paging     = new PagingConfig();

            ConfigurationBuilder.LoadConfiguration(this);
        }
Пример #6
0
        public void OnCreate(Bundle savedInstanceState, StripeConfig stripeConfig)
        {
            _stripeConfig = stripeConfig;

            PaymentConfiguration.Init(_stripeConfig.ApiKey);

            var stripeRemoteService =
                new StripeRemoteService(_stripeConfig, _restHttpClient, _logManager, _jsonSerializer);

            CustomerSession.InitCustomerSession(new StripeEphemeralKeyProvider(stripeRemoteService));

            _paymentSession = new PaymentSession(CrossCurrentActivity.Current.Activity);
            var config = new PaymentSessionConfig.Builder()
                         .SetShippingInfoRequired(false)
                         .SetShippingMethodsRequired(false)
                         .Build();

            _paymentSession.Init(new PaymentSessionListener(), config, savedInstanceState);

            StripeManager.Initialize(stripeRemoteService, _stripeConfig);
        }
Пример #7
0
 public static void Initialize(
     StripeRemoteService stripeRemoteService,
     StripeConfig config)
 {
     Instance = new StripeManager(stripeRemoteService, config);
 }
Пример #8
0
 private StripeManager(StripeRemoteService stripeRemoteService, StripeConfig config)
 {
     _stripeRemoteService = stripeRemoteService;
     _config = config;
 }
Пример #9
0
 public void Initialize(StripeConfig stripeConfig)
 {
 }
Пример #10
0
 public MedicalDataService(IDataProvider data, IOptions <StripeConfig> stripe)
 {
     _data   = data;
     _stripe = stripe.Value;
 }
 public DeleteSourceFromCustomerRequest(string dto, StripeConfig stripeConfig)
 {
     _stripeConfig = stripeConfig;
     _dto          = dto;
 }
Пример #12
0
 public StripeWebHook(IMedicalDataService medService, IOptions <StripeConfig> stripe)
 {
     _medService = medService;
     _stripe     = stripe.Value;
 }
Пример #13
0
 public PostAttachSourceToCustomerRequest(string dto, StripeConfig stripeConfig)
 {
     _stripeConfig = stripeConfig;
     _dto          = dto;
 }
Пример #14
0
 public PostCreateChargeRequest(IJsonSerializer jsonSerializer, ChargeDto dto, StripeConfig stripeConfig) : base(
         jsonSerializer, dto)
 {
     _stripeConfig = stripeConfig;
 }