void OnResultRet(string strMsg) { int nStatus = -1; int nTradeStatus = -1; string strSpsn = new string('\0', 5); StrParse(strMsg, out nStatus, out nTradeStatus, out strSpsn); Debug.Log("------OnResultRet strMsg=" + strMsg + " strSpsn=" + strSpsn); //请求成功 if (nStatus == 0) { //付费成功 if (nTradeStatus == 0) { //支付成功通知java层,标示 Debug.Log("pllog_Cyou_success:" + strSpsn); WebMediator.SuccessPayLog(strSpsn); // 转移到OnOrderRet //PurchaseHelper.Instance().AddCyouOrder(strSpsn); if (null != purchaseFinish) { purchaseFinish(nStatus, strSpsn, ""); } } else { if (null != purchaseFinish) { purchaseFinish(-1, strSpsn, "购买失败"); //TODO 字典替换 } } } else { if (null != purchaseFinish) { purchaseFinish(-1, strSpsn, "请求失败"); //TODO 字典替换 } } }