I have got few questions about In-App Purchase server model.
I have got my DB, and a table in which I store item description. For example, I've got a Sword priced $0.49 and a Mace priced $0.99. So table with fields - id, name, price, info(description). I want to display this items in my iOs application, and allow users to buy them. My server-side is written on php.
It seems that there is no normal tutorial on server-model for in-app purchase. So I was reading http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/APIOverview/OverviewoftheStoreKitAPI.html (figure 1.3), and it seems that I have to:
- Send request to my server and receive this items data. What is product identifier, and where can I get it?
- Application sends request to app store to get information for the products. What kind of request? Any sample code? What this request will return?
- Ok, now i'm displaying this info to user, he picks item he wants to buy, and app sends payment request to the appstore. Again, what request, any examples?
- Then app receives receipt data. And it must send it to my server. And my server must send this data to app store server to verify the purchase, how can I do it?
- Apple server returns answer to my server, and I add item to users inventory(f.e).
Now, about testing in-app purchase. As far as I understand I need to go to itunes connect, and add new application there, and add in-app monetization for this application, and test user, is it correct?