Example #1
0
 static int CancelRestoreProducts(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         PayMgr obj = (PayMgr)ToLua.CheckObject(L, 1, typeof(PayMgr));
         obj.CancelRestoreProducts();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #2
0
 static int PayResult(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         PayMgr obj  = (PayMgr)ToLua.CheckObject(L, 1, typeof(PayMgr));
         string arg0 = ToLua.CheckString(L, 2);
         obj.PayResult(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
 static int CompletedSKPaymentTransaction(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         PayMgr obj  = (PayMgr)ToLua.CheckObject(L, 1, typeof(PayMgr));
         string arg0 = ToLua.CheckString(L, 2);
         obj.CompletedSKPaymentTransaction(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #4
0
    static int CreateInstance(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 0);
            PayMgr o = MonoSingleton <PayMgr> .CreateInstance();

            ToLua.Push(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #5
0
 static int RestoreTransaction(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         PayMgr obj  = (PayMgr)ToLua.CheckObject(L, 1, typeof(PayMgr));
         string arg0 = ToLua.CheckString(L, 2);
         string arg1 = ToLua.CheckString(L, 3);
         obj.RestoreTransaction(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #6
0
 static int Pay(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         PayMgr obj  = (PayMgr)ToLua.CheckObject(L, 1, typeof(PayMgr));
         string arg0 = ToLua.CheckString(L, 2);
         string arg1 = ToLua.CheckString(L, 3);
         int    arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         string arg3 = ToLua.CheckString(L, 5);
         obj.Pay(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #7
0
 private void Awake()
 {
     _instance = this;
 }