@@ -15,7 +15,6 @@ public class IapManager : MonoBehaviour, IDetailedStoreListener
15
15
private static IapManager _instance ;
16
16
public static event Action < string > OnPurchaseSucceedEvent ;
17
17
public static event Action < string > OnPurchaseFailedEvent ;
18
- public static event Action < Product > OnIapTrackingRevenueEvent ;
19
18
public static event Action < bool > OnShowIapNativePopupEvent ;
20
19
21
20
private IStoreController _controller ;
@@ -157,7 +156,6 @@ public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs purchaseEvent)
157
156
void PurchaseVerified ( PurchaseEventArgs purchaseEvent )
158
157
{
159
158
OnShowIapNativePopupEvent ? . Invoke ( false ) ;
160
- OnIapTrackingRevenueEvent ? . Invoke ( purchaseEvent . purchasedProduct ) ;
161
159
InternalPurchaseSuccess ( purchaseEvent . purchasedProduct . definition . id ) ;
162
160
}
163
161
@@ -282,16 +280,16 @@ private bool InternalIsPurchasedProduct(string id)
282
280
_controller . products . WithID ( id ) . hasReceipt ;
283
281
}
284
282
285
- private string InternalLocalizedPriceProduct ( IapDataProduct product )
283
+ private Product InternalGetProduct ( IapDataProduct product )
286
284
{
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 ) ;
289
287
}
290
288
291
- private string InternalLocalizedPriceProduct ( string id )
289
+ private Product InternalGetProduct ( string id )
292
290
{
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 ) ;
295
293
}
296
294
297
295
#endregion
@@ -306,10 +304,8 @@ public static IapDataProduct PurchaseProduct(IapDataProduct product) =>
306
304
public static bool IsPurchasedProduct ( IapDataProduct product ) => _instance . InternalIsPurchasedProduct ( product ) ;
307
305
public static bool IsPurchasedProduct ( string id ) => _instance . InternalIsPurchasedProduct ( id ) ;
308
306
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 ) ;
313
309
#if UNITY_IOS
314
310
public static void RestorePurchase ( ) => _instance . InternalRestorePurchase ( ) ;
315
311
#endif
0 commit comments