Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Apple IAP purchases validation
Started by rollerband Oct 30 2019 06:25 AM

4 replies to this topic
apple iap purchases validation restore
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

rollerband

[GLOBAL: userInfoPane.html]
rollerband
  • Observer

  • 26 posts
  • Corona SDK

Hi,
We use validation of purchases through Game Sparks. We have a problem with IOS 13. Validation has stopped working. I try to swich to Apple IAP plugin (https://marketplace.coronalabs.com/corona-plugins/apple-iap).
Everything is fine and the store.receiptBase64Data () function returns exactly what I need to validate the recipe. But the Restore function does not work in it. The application just crashes. Another store.isActive is always true. Even when the plugin is not initialized. How can we restore purchases? Any ideas?


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

How are you trying to restore the purchases?



[TOPIC: post.html]
#3

rollerband

[GLOBAL: userInfoPane.html]
rollerband
  • Observer

  • 26 posts
  • Corona SDK

i call store.restore() function. 

at the transactionCallback() when i call store.finishTransaction( event.transaction ) i get an Error :

 

http://prntscr.com/pqn5y7



[TOPIC: post.html]
#4

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

About restoring: make sure you send only transactions to the finishTransaction. It is possible that you are sending some ather argument there.

Not all events should be sent to finishTransaction, you can try printing the event (print(json.prettify(event)) to see if may be you are closing not a transaction.



[TOPIC: post.html]
#5

rollerband

[GLOBAL: userInfoPane.html]
rollerband
  • Observer

  • 26 posts
  • Corona SDK

yes I know ) i use this:

if (event.transaction) then
    store.finishTransaction( event.transaction )
end



[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: apple iap, purchases validation, restore