|  |  |  | 
|---|
|  |  |  | private static FreePlatformUtil s_Instance; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private boolean m_Init = false; | 
|---|
|  |  |  | public boolean payProcessing = false; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static FreePlatformUtil getInstace() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | case FreeCallbackCode.PAY_SUCCESS: | 
|---|
|  |  |  | m_Message.put("code", CodeA2U.FreePlatformPayOk); | 
|---|
|  |  |  | UniversalUtil.sendMessageToUnity(m_Message); | 
|---|
|  |  |  | payProcessing = false; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case FreeCallbackCode.PAY_FAIL: | 
|---|
|  |  |  | m_Message.put("code", CodeA2U.FreePlatformPayFail); | 
|---|
|  |  |  | UniversalUtil.sendMessageToUnity(m_Message); | 
|---|
|  |  |  | payProcessing = false; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case FreeCallbackCode.PAY_CANCEL: | 
|---|
|  |  |  | m_Message.put("code", CodeA2U.FreePlatformPayCancel); | 
|---|
|  |  |  | UniversalUtil.sendMessageToUnity(m_Message); | 
|---|
|  |  |  | payProcessing = false; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onResult(boolean b, String account) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | m_Account = account; | 
|---|
|  |  |  | Map<String, Object> _registerMsg = new HashMap<>(); | 
|---|
|  |  |  | _registerMsg.put("code", CodeA2U.FreePlatformRegisterOk); | 
|---|
|  |  |  | _registerMsg.put("account", account); | 
|---|
|  |  |  | _registerMsg.put("account", m_Account); | 
|---|
|  |  |  | UniversalUtil.sendMessageToUnity(_registerMsg); | 
|---|
|  |  |  | Tracking.setRegisterWithAccountID(account); | 
|---|
|  |  |  | EventUtils.setRegister("mobile",true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String m_Account; | 
|---|
|  |  |  | public void SendRegisterEvent() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Tracking.setRegisterWithAccountID(m_Account); | 
|---|
|  |  |  | EventUtils.setRegister("mobile",true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|