/// <summary> /// 支付 /// </summary> public static void Pay(string SDKName, PayInfo payInfo) { Debug.Log("Pay SDKname " + SDKName + " GetHasSDKService " + GetHasSDKService(s_payServiceList, SDKName)); //优先使用本地配置的SDK if (GetHasSDKService(s_payServiceList, SDKName)) { try { GetPayService(SDKName).Pay(payInfo.goodsID, payInfo.tag); } catch (Exception e) { Debug.LogError("SDKManager Pay Exception: " + e.ToString()); } } else if (s_useNewSDKManager) { SDKManagerNew.Pay(SDKName, payInfo); } else { Debug.LogError("支付SDK 没有配置! "); } }
/// <summary> /// 支付 /// </summary> public static void Pay(string SDKName, string goodsID, string tag, GoodsType goodsType = GoodsType.NORMAL, string orderID = null) { if (s_useNewSDKManager) { SDKManagerNew.Pay(SDKName, goodsID, tag, goodsType, orderID); } else { try { GetPayService(SDKName).Pay(goodsID, tag); } catch (Exception e) { Debug.LogError("SDKManager Pay Exception: " + e.ToString()); } } }
/// <summary> /// 支付,默认访问第一个接口 /// </summary> public static void Pay(PayInfo payInfo) { //优先使用本地配置的SDK if (s_payServiceList.Count > 0) { try { GetPayService(0).Pay(payInfo); } catch (Exception e) { Debug.LogError("SDKManager Pay Exception: " + e.ToString()); } } else if (s_useNewSDKManager) { if (GetPrePay("")) { try { GetPayService("PublicPayClass").Pay(payInfo); } catch (Exception e) { Debug.LogError("SDKManager PublicPayClass Exception: " + e.ToString()); } } else { SDKManagerNew.Pay(payInfo); } } else { Debug.Log("支付SDK 没有配置! "); } }
/// <summary> /// 支付 /// </summary> public static void Pay(string SDKName, string goodsID, string tag, GoodsType goodsType = GoodsType.NORMAL, string orderID = null) { //优先使用本地配置的SDK if (GetHasSDKService(s_payServiceList, SDKName)) { try { GetPayService(SDKName).Pay(goodsID, tag); } catch (Exception e) { Debug.LogError("SDKManager Pay Exception: " + e.ToString()); } } else if (s_useNewSDKManager) { SDKManagerNew.Pay(SDKName, goodsID, tag, goodsType, orderID); } else { Debug.LogError("支付SDK 没有配置! "); } }
/// <summary> /// 支付,默认访问第一个接口 /// </summary> public static void Pay(PayInfo payInfo) { //优先使用本地配置的SDK if (s_payServiceList.Count > 0) { try { GetPayService(0).Pay(payInfo.goodsID, payInfo.tag); } catch (Exception e) { Debug.LogError("SDKManager Pay Exception: " + e.ToString()); } } else if (s_useNewSDKManager) { SDKManagerNew.Pay(payInfo); } else { Debug.Log("支付SDK 没有配置! "); } }