alipay package

main
Yuntao Hu 2025-10-27 12:08:30 +08:00
parent a3624a96e0
commit 01f8ebb887
3 changed files with 13 additions and 4 deletions

View File

@ -50,7 +50,9 @@ public class AliPayHandle : MonoBehaviour
/// </summary> /// </summary>
public void Initialize() public void Initialize()
{ {
#if AliPay
PaymentServiceLocator.AliPaymentService.Initialize(); PaymentServiceLocator.AliPaymentService.Initialize();
#endif
} }
/// <summary> /// <summary>
@ -58,9 +60,9 @@ public class AliPayHandle : MonoBehaviour
/// </summary> /// </summary>
public bool IsInitialized() public bool IsInitialized()
{ {
#if AliPay
return PaymentServiceLocator.AliPaymentService.IsAppInitialized(); return PaymentServiceLocator.AliPaymentService.IsAppInitialized();
#endif
return false; return false;
} }
@ -69,15 +71,17 @@ public class AliPayHandle : MonoBehaviour
/// </summary> /// </summary>
public bool IsPaying() public bool IsPaying()
{ {
#if AliPay
return PaymentServiceLocator.AliPaymentService.IsPaying(); return PaymentServiceLocator.AliPaymentService.IsPaying();
#endif
return false; return false;
} }
private void PayRequest(string currencyID, int count, int itemID) private void PayRequest(string currencyID, int count, int itemID)
{ {
#if AliPay
PaymentServiceLocator.AliPaymentService.BuyGoods(currencyID, count, itemID); PaymentServiceLocator.AliPaymentService.BuyGoods(currencyID, count, itemID);
#endif
} }
/// <summary> /// <summary>
@ -113,6 +117,8 @@ public class AliPayHandle : MonoBehaviour
public void OnPaymentCallback(string result) public void OnPaymentCallback(string result)
{ {
DebugUtil.Log("AliPayHandle.OnPaymentCallback result: {0}", result); DebugUtil.Log("AliPayHandle.OnPaymentCallback result: {0}", result);
#if AliPay
PaymentServiceLocator.AliPaymentService.OnPaymentCallback(result); PaymentServiceLocator.AliPaymentService.OnPaymentCallback(result);
#endif
} }
} }

View File

@ -0,0 +1,2 @@
Define_list:
- AliPay

View File

@ -0,0 +1 @@
0.0.1