This question is two main parts,
1)How does SDKBOX propose the handling of SKPaymentTransactionStateDeferred?
In the case that a user attempts to make a purchase, but has to get permission via ‘Ask to Buy’ on iOS, the transaction will be incomplete and should be completed at a later time.
There seems to be no documentation on this, will this result in a call to onCanceled() ? onFailure()?
onFailure also only returns a msg string, no sensible error code, so how can the app know that there is a purchase waiting to be completed at a later date or even show a sensible error to the user to get purchase permission and return later?
In the case that a user performs the following flow:
- make purchase in-app
- receive StateDeferred
- close app
- purchase is completed by parent
- open app
^ At this point how the app to know that there is a pending purchase to be completed? What should be called at this point to complete the deferred purchase? finishTransaction() does not seem appropriate as the app does not know the SKU of the purchase that was deferred before it was closed
2)My second question is what is the correct flow for handling situations where a purchase was successful, but notifying a (self managed) server about the purchase failed (verification failed) due to issues such as network connectivity.
Is there any way to retrieve past purchases to try again? (These are consumable purchases which do not seem to be returned via restore()
I have a feeling this is what ‘setAutoFinishTransaction’ is designed for there is absolutely no documentation regarding what this setter does
What does this setter do? What is the behavior? What is the expected outcome? How is it to be used? Is it iOS only? (Some threads seem to imply this was added to android too but the library header says otherwise)
In the case that this is not implemented on Android what are we supposed to do in the case of failing to remote-verify a purchase and needing to try again at a later time.
Can we get some real documentation on this other than
set auto invoke finishTransaction flag
Overall I feel extremely frustrated right now with the lack of any real documentation of a very critical SDK component and am on the verge of tearing it out and spending 1-2 days making platform-specific implementations for iOS and Android just to even understand what will happen in these edge cases.
I think if a library wants to ‘hide the details and make things easy’ for a developer, it needs to have very strong documentation to at least tell us that these cases are handled (the two cases above seem to not even be handled however)