ladeiko / node-apple-receipt-verify

A Node.js module for In-App-Purchase receipt validation for iOS.
MIT License
92 stars 25 forks source link

Missing information #16

Closed mangelsnc closed 8 months ago

mangelsnc commented 4 years ago

Hi!

First of all, good job! But I miss some information that is not included in the response, I need for example access to the latest_receipt and latest_receipt_info fields (for example), but you only return the purchased products.

Are you planning in some way to make the response more extended? Or a way to configure it?

ladeiko commented 4 years ago

Hi What info do you need?

On Oct 7, 2020, at 13:47, Miguel Ángel Sánchez Chordi notifications@github.com wrote:

Hi!

First of all, good job! But I miss some information that is not included in the response, I need for example access to the latest_receipt and latest_receipt_info fields (for example), but you only return the purchased products.

Are you planning in some way to make the response more extended? Or a way to configure it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ladeiko/node-apple-receipt-verify/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5VJUWUIVQQY53MJD5E6QDSJRBKRANCNFSM4SHHDTOA.

knuttyse commented 4 years ago

Hi! I also appreciate your effort a lot. :)

I see original_transaction_id is available during runtime, but is not declared in the PurchasedProducts interface. Is it safe to assume original_transaction_id?

original_transaction_id seems useful for handling auto renewable subscriptions. (My understanding is that original_transaction_id identifies a subscription and could be used if/when server to server notifications don't work)

ladeiko commented 4 years ago

original_transaction_id is id of first transaction in purchases chain, it can be used as user identification

knuttyse commented 4 years ago

That's right! 👍

However, I am more comfortable using an original_transaction_id that is already attached to the purchase object.

I think a receipt can contain more than one original_transaction_id if you purchase several things. For example a user can purchase a non-consumable product and a subscription. Of course, I can filter on productId, but perhaps the user cancelled and then re-subscribed and got a new original_transaction_id?

ladeiko commented 4 years ago

every purchase has 'originalTransactionId'

knuttyse commented 4 years ago

Cool! I probably posted this in the wrong place. I'm using Typescript and didn't realize you are not the maintainer of the type defenitions. https://www.npmjs.com/package/@types/node-apple-receipt-verify

ladeiko commented 4 years ago

You can define interface in your project