static IGooglePlayStoreService BuildGooglePlayStoreServiceAar(IGooglePurchaseCallback googlePurchaseCallback)
        {
            IGoogleCachedQuerySkuDetailsService googleCachedQuerySkuDetailsService = new GoogleCachedQuerySkuDetailsService();
            IGoogleLastKnownProductService      googleLastKnownProductService      = new GoogleLastKnownProductService();
            IGooglePurchaseUpdatedListener      googlePurchaseUpdatedListener      = new GooglePurchaseUpdatedListener(googleLastKnownProductService, googlePurchaseCallback, googleCachedQuerySkuDetailsService);
            IGoogleBillingClient            googleBillingClient          = new GoogleBillingClient(googlePurchaseUpdatedListener);
            IQuerySkuDetailsService         googleQuerySkuDetailsService = new QuerySkuDetailsService(googleBillingClient, googleCachedQuerySkuDetailsService);
            IGooglePurchaseService          purchaseService            = new GooglePurchaseService(googleBillingClient, googlePurchaseCallback, googleQuerySkuDetailsService);
            IGoogleQueryPurchasesService    queryPurchasesService      = new GoogleQueryPurchasesService(googleBillingClient, googleCachedQuerySkuDetailsService);
            IGoogleFinishTransactionService finishTransactionService   = new GoogleFinishTransactionService(googleBillingClient, queryPurchasesService);
            IBillingClientStateListener     billingClientStateListener = new BillingClientStateListener();
            IGooglePriceChangeService       priceChangeService         = new GooglePriceChangeService(googleBillingClient, googleCachedQuerySkuDetailsService);

            IGooglePlayStoreService googlePlayStoreService = new GooglePlayStoreService(
                googleBillingClient,
                googleQuerySkuDetailsService,
                purchaseService,
                finishTransactionService,
                queryPurchasesService,
                billingClientStateListener,
                priceChangeService,
                googleLastKnownProductService
                );

            return(googlePlayStoreService);
        }
        IGooglePlayStoreService BuildGooglePlayStoreServiceAar(IGooglePurchaseCallback googlePurchaseCallback)
        {
            var googleCachedQuerySkuDetailsService = new GoogleCachedQuerySkuDetailsService();
            var googleLastKnownProductService      = new GoogleLastKnownProductService();
            var googlePurchaseUpdatedListener      = new GooglePurchaseUpdatedListener(googleLastKnownProductService, googlePurchaseCallback, googleCachedQuerySkuDetailsService);
            var googleBillingClient          = new GoogleBillingClient(googlePurchaseUpdatedListener, util);
            var skuDetailsConverter          = new SkuDetailsConverter();
            var retryPolicy                  = new ExponentialRetryPolicy();
            var googleQuerySkuDetailsService = new QuerySkuDetailsService(googleBillingClient, googleCachedQuerySkuDetailsService, skuDetailsConverter, retryPolicy);
            var purchaseService              = new GooglePurchaseService(googleBillingClient, googlePurchaseCallback, googleQuerySkuDetailsService);
            var queryPurchasesService        = new GoogleQueryPurchasesService(googleBillingClient, googleCachedQuerySkuDetailsService);
            var finishTransactionService     = new GoogleFinishTransactionService(googleBillingClient, queryPurchasesService);
            var billingClientStateListener   = new BillingClientStateListener();
            var priceChangeService           = new GooglePriceChangeService(googleBillingClient, googleQuerySkuDetailsService);

            return(new GooglePlayStoreService(
                       googleBillingClient,
                       googleQuerySkuDetailsService,
                       purchaseService,
                       finishTransactionService,
                       queryPurchasesService,
                       billingClientStateListener,
                       priceChangeService,
                       googleLastKnownProductService
                       ));
        }
        static GooglePlayStoreExtensions BuildGooglePlayStoreExtensions(IGooglePlayStoreService googlePlayStoreService,
                                                                        IGooglePlayStoreFinishTransactionService googlePlayStoreFinishTransactionService,
                                                                        IGooglePurchaseCallback googlePurchaseCallback,
                                                                        GooglePlayStoreExtensionsInternal googlePlayStoreExtensionsInternal)
        {
            GooglePlayStoreExtensions googlePlayStoreExtensions = new GooglePlayStoreExtensions(
                googlePlayStoreService,
                googlePlayStoreFinishTransactionService,
                googlePlayStoreExtensionsInternal);

            googlePurchaseCallback.SetStoreExtension(googlePlayStoreExtensions);
            return(googlePlayStoreExtensions);
        }
Exemple #4
0
 public GooglePlayStore(
     IGooglePlayStoreRetrieveProductsService retrieveProductsService,
     IGooglePlayStorePurchaseService storePurchaseService,
     IGoogleFetchPurchases fetchPurchases,
     IGooglePlayStoreFinishTransactionService transactionService,
     IGooglePurchaseCallback googlePurchaseCallback,
     IGooglePlayStoreExtensionsInternal googlePlayStoreExtensions,
     IUtil util)
 {
     m_Util = util;
     m_RetrieveProductsService   = retrieveProductsService;
     m_StorePurchaseService      = storePurchaseService;
     m_FetchPurchases            = fetchPurchases;
     m_FinishTransactionService  = transactionService;
     m_GooglePurchaseCallback    = googlePurchaseCallback;
     m_GooglePlayStoreExtensions = googlePlayStoreExtensions;
 }
        static GooglePlayConfiguration BuildGooglePlayStoreConfiguration(IGooglePlayStoreService googlePlayStoreService, IGooglePurchaseCallback googlePurchaseCallback)
        {
            GooglePlayConfiguration googlePlayConfiguration = new GooglePlayConfiguration(googlePlayStoreService);

            googlePurchaseCallback.SetStoreConfiguration(googlePlayConfiguration);
            return(googlePlayConfiguration);
        }
Exemple #6
0
 internal GooglePurchaseService(IGoogleBillingClient billingClient, IGooglePurchaseCallback googlePurchaseCallback, IQuerySkuDetailsService querySkuDetailsService)
 {
     m_BillingClient          = billingClient;
     m_GooglePurchaseCallback = googlePurchaseCallback;
     m_QuerySkuDetailsService = querySkuDetailsService;
 }
Exemple #7
0
 internal GooglePurchaseUpdatedListener(IGoogleLastKnownProductService googleLastKnownProductService, IGooglePurchaseCallback googlePurchaseCallback, IGoogleCachedQuerySkuDetailsService googleCachedQuerySkuDetailsService) : base(k_AndroidPurchaseListenerClassName)
 {
     m_LastKnownProductService            = googleLastKnownProductService;
     m_GooglePurchaseCallback             = googlePurchaseCallback;
     m_GoogleCachedQuerySkuDetailsService = googleCachedQuerySkuDetailsService;
 }