@@ -15,7 +15,6 @@ public class IapManager : MonoBehaviour, IDetailedStoreListener
1515 private static IapManager _instance ;
1616 public static event Action < string > OnPurchaseSucceedEvent ;
1717 public static event Action < string > OnPurchaseFailedEvent ;
18- public static event Action < Product > OnIapTrackingRevenueEvent ;
1918 public static event Action < bool > OnShowIapNativePopupEvent ;
2019
2120 private IStoreController _controller ;
@@ -157,7 +156,6 @@ public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs purchaseEvent)
157156 void PurchaseVerified ( PurchaseEventArgs purchaseEvent )
158157 {
159158 OnShowIapNativePopupEvent ? . Invoke ( false ) ;
160- OnIapTrackingRevenueEvent ? . Invoke ( purchaseEvent . purchasedProduct ) ;
161159 InternalPurchaseSuccess ( purchaseEvent . purchasedProduct . definition . id ) ;
162160 }
163161
@@ -282,16 +280,16 @@ private bool InternalIsPurchasedProduct(string id)
282280 _controller . products . WithID ( id ) . hasReceipt ;
283281 }
284282
285- private string InternalLocalizedPriceProduct ( IapDataProduct product )
283+ private Product InternalGetProduct ( IapDataProduct product )
286284 {
287- if ( _controller == null ) return "" ;
288- return _controller . products . WithID ( product . Id ) . metadata . localizedPriceString ;
285+ if ( _controller == null ) return null ;
286+ return _controller . products . WithID ( product . Id ) ;
289287 }
290288
291- private string InternalLocalizedPriceProduct ( string id )
289+ private Product InternalGetProduct ( string id )
292290 {
293- if ( _controller == null ) return "" ;
294- return _controller . products . WithID ( id ) . metadata . localizedPriceString ;
291+ if ( _controller == null ) return null ;
292+ return _controller . products . WithID ( id ) ;
295293 }
296294
297295 #endregion
@@ -306,10 +304,8 @@ public static IapDataProduct PurchaseProduct(IapDataProduct product) =>
306304 public static bool IsPurchasedProduct ( IapDataProduct product ) => _instance . InternalIsPurchasedProduct ( product ) ;
307305 public static bool IsPurchasedProduct ( string id ) => _instance . InternalIsPurchasedProduct ( id ) ;
308306
309- public static string LocalizedPriceProduct ( IapDataProduct product ) =>
310- _instance . InternalLocalizedPriceProduct ( product ) ;
311-
312- public static string LocalizedPriceProduct ( string id ) => _instance . InternalLocalizedPriceProduct ( id ) ;
307+ public static Product GetProduct ( string id ) => _instance . InternalGetProduct ( id ) ;
308+ public static Product GetProduct ( IapDataProduct product ) => _instance . InternalGetProduct ( product ) ;
313309#if UNITY_IOS
314310 public static void RestorePurchase ( ) => _instance . InternalRestorePurchase ( ) ;
315311#endif
0 commit comments