can In-App-Purchase on iOS be done on backend server? -
i've read quite bit in-app-purchase ios, including of apple's documentation , didn't find regarding making purchase backend server.
the piece of puzzle bothers me situation when user made purchase on ios , after it's done, application got receipt. sends backend server verification , custom logic right when user lost internet connection. happens next user sees apple's dialog saying "purchase completed" while goods haven't arrive application (it's consumable virtual currency in case).
so thinking clean solution communicate backend server make purchase, , if internet connection lost, no purchase done (could done in several communication steps).
what people in case of situation described above? showing dialog user saying "communicating server" him see progress while retrying send receipt backend server?
i love best practice tips around this.
some information: backend server .net 4.5 wcf web service
the answer simple: no.
it's because purchases made using apple id , apple doesn't want share these credentials.
should care things can go wrong while communicating/validating receipt.
remember user can restore previous purchases restoring transactions, since purchases consumable type should take care invalidating consumed receipt.
can implement system that:
- user buy
- transaction completed success
- a reference receipt stored in queue validation
- the client send receipt validating
- once validated reference removed queue , purchase activated
if client never receive validated response due error or timeout, can retry operation or keep in queue further check informing user there error.
Comments
Post a Comment