Esempio n. 1
0
        private IBillingService instantiateBillingSubsystem()
        {
            switch (config.CurrentPlatform)
            {
            case BillingPlatform.AppleAppStore:
                return(new AppleAppStoreBillingService(config, getMapper(), platformProvider.getStorekit(), getLogger()));

            case BillingPlatform.AmazonAppstore:
                return(new AmazonAppStoreBillingService(platformProvider.getAmazon(), getMapper(), config, getTransactionDatabase(), getLogger()));

            case BillingPlatform.GooglePlay:
                return(new GooglePlayBillingService(platformProvider.getGooglePlay(), config, getMapper(), getLogger()));

            case BillingPlatform.MacAppStore:
                return(new AppleAppStoreBillingService(config, getMapper(), platformProvider.getStorekit(), getLogger()));

            case BillingPlatform.WindowsPhone8:
                var result = new WP8BillingService(unibill.Dummy.Factory.Create(config.WP8SandboxEnabled, GetDummyProducts()), config, getMapper(), getTransactionDatabase(), getLogger());
                new GameObject().AddComponent <WP8Eventhook>().callback = result;
                return(result);

            case BillingPlatform.Windows8_1:
                var win8 = new Win8_1BillingService(unibill.Dummy.Factory.Create(config.UseWin8_1Sandbox, GetDummyProducts()), config, getMapper(), getTransactionDatabase(), getLogger());
                new GameObject().AddComponent <Win8Eventhook>().callback = win8;
                return(win8);

            case BillingPlatform.SamsungApps:
                return(new SamsungAppsBillingService(config, getMapper(), platformProvider.getSamsung(), getLogger()));
            }
            return(new Tests.FakeBillingService(getMapper()));
        }
Esempio n. 2
0
        private IBillingService instantiateBillingSubsystem() {
            switch (config.CurrentPlatform) {
                case BillingPlatform.AppleAppStore:
                    return new AppleAppStoreBillingService(config, getMapper(), platformProvider.getStorekit());
                case BillingPlatform.AmazonAppstore:
                    return new AmazonAppStoreBillingService(platformProvider.getAmazon(), getMapper(), config, getTransactionDatabase(), getLogger());
                case BillingPlatform.GooglePlay:
                    return new GooglePlayBillingService(platformProvider.getGooglePlay(), config, getMapper(), getLogger());
                case BillingPlatform.MacAppStore:
                    return new AppleAppStoreBillingService(config, getMapper(), platformProvider.getStorekit());
                case BillingPlatform.WindowsPhone8:
                    var result = new WP8BillingService(unibill.Dummy.Factory.Create(config.WP8SandboxEnabled, GetDummyProducts()), config, getMapper(), getTransactionDatabase(), getLogger());
                    new GameObject().AddComponent<WP8Eventhook>().callback = result;
                    return result;
                case BillingPlatform.Windows8_1:
                    var win8 = new Win8_1BillingService(unibill.Dummy.Factory.Create(config.UseWin8_1Sandbox, GetDummyProducts()), config, getMapper(), getTransactionDatabase(), getLogger());
                    new GameObject().AddComponent<Win8Eventhook>().callback = win8;
                    return win8;
				case BillingPlatform.SamsungApps:
					return new SamsungAppsBillingService (config, getMapper (), platformProvider.getSamsung (), getLogger ());
            }
			return new Tests.FakeBillingService(getMapper());
        }