コード例 #1
0
        public Biller instantiate()
        {
            IBillingService svc = instantiateBillingSubsystem();

            var biller = new Biller(config, getTransactionDatabase(), svc, getLogger(), getHelp(), getMapper(), getCurrencyManager());
            instantiateAnalytics (biller);
            return biller;
        }
コード例 #2
0
ファイル: Biller.cs プロジェクト: nhhoang/shooting
        public static Biller instantiate() {
            IBillingService svc = instantiateBillingSubsystem();

            var biller = new Biller(getInventory(), getTransactionDatabase(), svc, getLogger(), getHelp(), getMapper());
            return biller;
        }
コード例 #3
0
ファイル: Unibiller.cs プロジェクト: jhillkwaj/WordsOnWords
    /// <summary>
    /// Visible only for unit testing.
    /// Do NOT call this method.
    /// </summary>
    public static void _internal_doInitialise(Biller biller, BillerFactory factory)
    {
        Unibiller.biller = biller;
        biller.onBillerReady += (success) => {
            if (onBillerReady != null) {
                if (success) {
                    // Download manager needs Unibill to be initialised to get purchase receipts.
                    downloadManager = factory.instantiateDownloadManager (biller);
                    downloadManager.onDownloadCompletedEvent += onDownloadCompletedEvent;
                    downloadManager.onDownloadFailedEvent += onDownloadFailedEvent;
                    downloadManager.onDownloadProgressedEvent += onDownloadProgressedEvent;

                    onBillerReady(biller.State == Unibill.Impl.BillerState.INITIALISED ? UnibillState.SUCCESS : UnibillState.SUCCESS_WITH_ERRORS);
                } else {
                    onBillerReady(UnibillState.CRITICAL_ERROR);
                }
            }
        };

        biller.onPurchaseCancelled += _onPurchaseCancelled;
        biller.onPurchaseComplete += _onPurchaseComplete;
        biller.onPurchaseFailed += _onPurchaseFailed;
        biller.onPurchaseRefunded += _onPurchaseRefunded;
        biller.onTransactionsRestored += _onTransactionsRestored;

        biller.Initialise();
    }
コード例 #4
0
    /// <summary>
    /// Visible only for unit testing.
    /// Do NOT call this method.
    /// </summary>
    public static void _internal_doInitialise (Biller biller) {
        Unibiller.biller = biller;
        biller.onBillerReady += (success) => {
            if (onBillerReady != null) {
                if (success) {
                    onBillerReady(biller.State == Unibill.Impl.BillerState.INITIALISED ? UnibillState.SUCCESS : UnibillState.SUCCESS_WITH_ERRORS);
                } else {
                    onBillerReady(UnibillState.CRITICAL_ERROR);
                }
            }
        };
        

        biller.onPurchaseCancelled += _onPurchaseCancelled;
        biller.onPurchaseComplete += _onPurchaseComplete;
        biller.onPurchaseFailed += _onPurchaseFailed;
        biller.onPurchaseRefunded += _onPurchaseRefunded;
        biller.onTransactionsRestored += _onTransactionsRestored;

        biller.Initialise();
    }
コード例 #5
0
 public DownloadManager instantiateDownloadManager(Biller biller)
 {
     var result = new DownloadManager (biller, util, storage, new UnityURLFetcher (), logger, biller.InventoryDatabase.CurrentPlatform, biller.InventoryDatabase.UnibillAnalyticsAppSecret);
     util.InitiateCoroutine (result.monitorDownloads ());
     return result;
 }
コード例 #6
0
 public void instantiateAnalytics(Biller biller)
 {
     if (!string.IsNullOrEmpty (config.UnibillAnalyticsAppId)) {
         new AnalyticsReporter (biller, config, platformProvider.getHTTPClient (util), getStorage (), util, platformProvider.getLevelLoadListener ());
     }
 }