You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
When a user make a payment with "Ask to buy" enabled (typically with parental controls), the lib receives an event SKPaymentTransactionStateDeferred.
The lib should provide a notification of this updated state, so that the hosting app can display an appropriated UX (similar to Android pending payments).
Emulator only (behaviour easier to test with xcode12 and ios 14)
Steps to reproduce the behavior
Run example app with Xcode12 (rc5), on a iOS 14 device
Create a *.storekit file (see WWDC explaination for this new feature if necessary) with "Enable Ask to buy"
Attempt a payment
=> no event is forwarded to purchaseUpdatedListener nor purchaseErrorListener
I submit this issue to start a discussion on the desired implementation. Some ideas I would suggest:
forwarding this event on purchaseUpdatedListener seems to be the most logical implementation
however, we should consider that:
this means a breaking change
to distinguish the SKPaymentTransactionStateDeferred event from a standard SKPaymentTransactionStatePurchased event, it would require to passe some form of purchaseState for every event (similarly to the existing purchaseStateAndroid
Happy to get your feedback on this one, I plan to submit a pull request for this feature by the start of next week
The text was updated successfully, but these errors were encountered:
That's indeed something we have to implement in react-native-iap, it's been some time I have this one on my todo list.
Since there is no receipt to validate when receiving a deferred state, maybe we could send an event in the purchaseErrorListener with an error code transaction_deferred ?
Would be easy to catch the error and display the appropriate message.
We wouldn't have to add any new property to return the state and we wouldn't have any breaking change.
Version of react-native-iap
4.5.2
Version of react-native
0.62.0
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
When a user make a payment with "Ask to buy" enabled (typically with parental controls), the lib receives an event SKPaymentTransactionStateDeferred.
The lib should provide a notification of this updated state, so that the hosting app can display an appropriated UX (similar to Android pending payments).
Actual behavior
The lib doesn't do anything, except some logs
Tested environment (Emulator? Real Device?)
Emulator only (behaviour easier to test with xcode12 and ios 14)
Steps to reproduce the behavior
purchaseUpdatedListener
norpurchaseErrorListener
I submit this issue to start a discussion on the desired implementation. Some ideas I would suggest:
purchaseUpdatedListener
seems to be the most logical implementationSKPaymentTransactionStateDeferred
event from a standardSKPaymentTransactionStatePurchased
event, it would require to passe some form ofpurchaseState
for every event (similarly to the existing purchaseStateAndroidHappy to get your feedback on this one, I plan to submit a pull request for this feature by the start of next week
The text was updated successfully, but these errors were encountered: