robotmedia / RMStore

A lightweight iOS library for In-App Purchases
Apache License 2.0
2.43k stars 450 forks source link

Saving a copy of receipt NSData containing consumables #131

Open Seoras opened 9 years ago

Seoras commented 9 years ago

I've modified + (RMAppReceipt*)bundleReceipt in RMAppReceipt.m to save a copy of the raw receipt data -before- it goes to the verificator and the transaction is marked as complete and the receipt gets flushed of it's consumables. The reason I do this is that I need to send the receipt to my server which acts like a clearing bank for credits purchased in-app. Server requires the raw receipt to send to Apples servers to unpack and verify.

As a feature request it would be nice to have a hook (block call, delegate, etc) to invoke custom code that's given the raw receipt data, still containing the consumable, to do additional work with.