Пример #1
0
    /// <summary>
    /// 统计用户的成功充值数据
    /// </summary>
    /// <param name="data"></param>
    public void PaySucceess(PayInfo payInfo)
    {
        if (payInfo.GetPayInfoStr() == null)
        {
            Debug.LogError("ReYunSDKHelper PaySucceess() data == null!!!!");
            return;
        }

#if UNITY_ANDROID
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        if (_SDKHelperPlugin == null)
        {
            Debug.LogError("ReYunSDKHelper PaySucceess() _SDKHelperPlugin == null!!!!");
            return;
        }
        _SDKHelperPlugin.Call("paySuccess", payInfo.GetReYunPayStartStr());
#elif UNITY_IOS
        if (Application.platform != RuntimePlatform.IPhonePlayer)
        {
            return;
        }

        // ReYun_PaySuccess(jsonStr);
#else
#endif
    }
Пример #2
0
    /// <summary>
    /// 统计用户开始充值数据
    /// </summary>
    /// <param name="data"></param>
    public void StartPay(PayInfo payInfo)
    {
        if (payInfo == null)
        {
            Debug.LogError("ReYunSDKHelper StartPay() data == null!!!!");
            return;
        }

        // string jsonStr = MiNiJSON.Json.Serialize(data);
#if UNITY_ANDROID
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        if (_SDKHelperPlugin == null)
        {
            Debug.LogError("ReYunSDKHelper StartPay() _SDKHelperPlugin == null!!!!");
            return;
        }
        _SDKHelperPlugin.Call("startPay", payInfo.GetReYunPayStartStr());
#elif UNITY_IOS
        if (Application.platform != RuntimePlatform.IPhonePlayer)
        {
            return;
        }

        // ReYun_StartPay(jsonStr);
#else
#endif
    }