-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right way to get the last receipt data using RMStore #148
Comments
RMAppReceipt *receipt = [RMAppReceipt bundleReceipt];
|
RMStoreAppReceiptVerificator *verificator = [RMStoreAppReceiptVerificator new]; but you need to make it accessable in the class first. in RMStoreAppReceiptVerificator.h add
|
hi @justvanbloom know it's been a while since you answered, but had a qq - if we are dealing only with auto-renewables, do we always have to loop over the receipts? given I only care if one of the three subscriptions (part of same family) are active, couldn't I technically just just look at the last receipt? (given, any upgrade or cancellation will replace the previous receipt) |
Just look at the last recipe? Technically yes, BUT do you know it's there? download the last recipe if there is no and verify if it is a real one and look at the buytime eg. |
Sorry, I made a typo. I meant the last element in |
Yep. The same way. I'll tmr at code and get you the lines. Nice Sunday. |
RMAppReceipt *receipt = [RMAppReceipt bundleReceipt]; if (receipt != nil) { |
Awesome, thanks for your help! Apologies, one last question, but would you have any idea why when I call |
Nslog the recipe and you will see :) |
Haha that's what I'm doing! Is there something I should be checking for? Receipt is magically changing somehow after leaving view and segueing again. All I'm doing is |
Sort it by lastone or step trough all. Depends on usage. |
I think it was just a race condition, maybe because I changed the bundle id earlier. Tried it on a new phone and seems to be working so far. Here's to hoping things are good now. Thanks for your help! |
I'm testing in-app-purchase functionality and stuck in receipt validation step. My receipt validation is customized and based on number of checks I proceed on server-side(calling my server API) and one them is condition for transactionID uniqueness to confirm payment. So, using RMStore I'm getting receipt successfully and addPayment function return unique transaction to success block. After that I'm running verifyTransaction and call receiptURL inside success block. Unfortunately, it looks like I'm always get the same receipt using receiptURL and when I send it to my server it responds me with error that transactionID already exists in DB and transactionID is not unique. This error indicates that I send the same receipt even I do new payment. Please, note I use consumable product.
Can someone show me the right chain of calls I provide below in order I do that in my code :
-- Do I need to call this function at all? Apple sends me unique transactinID each time I pay and calling this function has no influence.
-- Do I need to call transaction verification?
-- Are those ways to get receiptURL equal ? Both don't work as I expect.
-- Here is the main problem I'm experiencing. After different attempts with combination of functions I mentioned upper, this method always return the receipt with the same transactionID. This makes me think that there is a cash I need to refresh before run App crash on request products #5, Payment fail #6 to get the last receipt, but it is not clear how to do that.
So, RMStore wiki looks good, but I always expect that library will give me a chance do not fully understand what is going on under the hood. Unfortunately for RMStore I have to investigate how Apple in app purchase API works. This can be resolved if a consequence of functions calls will be provided for RMStore what I cannot find it anywhere(!)
Can someone review the list of functions I provided upper and help me with putting them in right order what let me fix my issue with getting the last receipt after the purchase I do?
The text was updated successfully, but these errors were encountered: