PeterStaev / nativescript-purchase

:moneybag: A NativeScript plugin for making in-app purchases!
Apache License 2.0
83 stars 28 forks source link

feat(ios): Expose finishTransaction method #106

Closed MCurran16 closed 4 years ago

MCurran16 commented 4 years ago

StoreKit calls your observer’s paymentQueue(_:updatedTransactions:) method every time your app launches or resumes from background to tell you about transactions in the queue. Add the ability to finish transactions outside of the purchasing flow.

PeterStaev commented 4 years ago

@MCurran16 , the finishTransaction is already automatically called by the observer here: https://github.com/PeterStaev/nativescript-purchase/blob/626d65271a9a7de9b2a8b87fb90a5e46ec5e8bc5/purchase.ios.ts#L137-L143

So I don't see why we should expose this method to public.

MCurran16 commented 4 years ago

Closing. I was making an incorrect assumption in the way we are using this plugin. I wanted to be able to force the transaction to be removed from the queue after we verify the receipt on resume/launch.