iap-receipt-validator icon indicating copy to clipboard operation
iap-receipt-validator copied to clipboard

Basic question: Why is "latest_receipt_info" an Array? What is "receipt" for?

Open booboothefool opened this issue 7 years ago • 6 comments

For latest_receipt_info should I just always take latest_receipt_info[0]?

What exactly, is receipt? It has original_purchase_date, etc. in 2013, which confuses me.

Additionally, what is receipt.request_date? It's the date of what request? The verification request? So it's like a last_verified_at?

If the user cancels, will there be cancellation_field?

screen shot 2017-04-18 at 11 44 28 am

booboothefool avatar Apr 19 '17 02:04 booboothefool

Okay, so what is going on here exactly?

(I looped through latest_receipt_info and mapped the relevant stuff out.)

screen shot 2017-04-19 at 1 34 45 pm

@sibelius In your example https://github.com/chirag04/react-native-in-app-utils#monthly-subscriptions you mentioned latest_receipt_info[0].

It seems like you really want the last one though?

booboothefool avatar Apr 19 '17 17:04 booboothefool

hm, that makes sense

do you mind sending a PR fixing this?

tks for taking a look on this

sibelius avatar Apr 19 '17 17:04 sibelius

I've been wondering the same here. Are each of these indexes different purchases? They seem like the same product.

When a purchase is made, the receipt from the purchase needs to be stored somewhere and that is what you send to this validator, correct?

Trying to wrap my head around this process.

ryancoughlin avatar Jul 22 '17 15:07 ryancoughlin

These are the docs for the receipt fields > https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

Eyesonly88 avatar Nov 25 '17 06:11 Eyesonly88

just to check the subscription was activated( legal or worked ) in old past time when the user had stoppted a duration, and then renewed latter.

For example, if a user subscript in Jan, and lapsed in Feb, and renewed in March. So, Jan - Active Feb - Lapsed March - Active.

So return a array.

We can get the check it is current according to 'latest_receipt' & 'latest_receipt_info'

lwx5924 avatar Jun 28 '18 09:06 lwx5924

can we close this?

sibelius avatar Jun 28 '18 11:06 sibelius