コード例 #1
0
 public void TrySendCacheOrderToPHP()
 {
     if (SDKManager.Instance.IsAndroidYSDK())
     {
         string stringPrefs = PlayerPrefsExt.GetStringPrefs("YSDK_ORDER_RECORD");
         Debug.Log("TrySendCacheOrderToPHP: URL = " + stringPrefs);
         if (string.IsNullOrEmpty(stringPrefs))
         {
             return;
         }
         this.SubmitExtendData(null, SDKManager.SubmitTypeURLToPHP, stringPrefs);
         PlayerPrefsExt.SetStringPrefs("YSDK_ORDER_RECORD", string.Empty);
     }
 }
コード例 #2
0
 private void OnPayToRechargeDiamondResp_YSDK(SDKStatusCode code, string data)
 {
     if (code == (SDKStatusCode)1)
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm("提示", "服务器没有响应,请稍后再试", null, "确定", "button_orange_1", null);
     }
     else if (code == (SDKStatusCode)2)
     {
         this.YSDK_CheckBalanceSuccess(data);
     }
     else if (code == (SDKStatusCode)3)
     {
         Debug.Log("YSDK: 记录订单");
         JsonData jsonData = JsonMapper.ToObject(data);
         string   value    = (string)jsonData["orderId"];
         PlayerPrefsExt.SetStringPrefs("YSDK_ORDER_RECORD", value);
     }
     else if (code == (SDKStatusCode)4)
     {
         Debug.Log("YSDK: 移除订单记录");
         PlayerPrefsExt.SetStringPrefs("YSDK_ORDER_RECORD", string.Empty);
     }
 }