コード例 #1
0
 public bool SetupInAppPurchase()
 {
     registerInternalService(_inAppPurchase = GetInAppPurchase());
     if (_inAppPurchase != null)
     {
         return(_inAppPurchase.Setup());
     }
     return(false);
 }
コード例 #2
0
        public PsdkInAppPurchase(IPsdkServiceManager sm)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:      _impl = new IphoneInAppPurchase(); break;

                                #if UNITY_ANDROID
            case RuntimePlatform.Android:           _impl = new AndroidInAppPurchase(sm.GetImplementation()); break;
                                #endif
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.OSXEditor:         _impl = new UnityInAppPurchase(); break;

            default:
                throw new System.Exception("Platform not supported for External Configuration.");
            }
        }
コード例 #3
0
        public IPsdkInAppPurchase GetInAppPurchase()
        {
            if (!isPsdkValid())
            {
                return(null);
            }
            if (_inAppPurchase != null)
            {
                return(_inAppPurchase);
            }
            _inAppPurchase = GettingServiceByReflection <IPsdkInAppPurchase> ("PsdkInAppPurchase");
            if (_inAppPurchase != null)
            {
                return(_inAppPurchase);
            }
            if (!_silent)
            {
                Debug.Log("Could not initiate PsdkInAppPurchase !");
            }

            return(null);
        }