Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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

10 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

  • 27 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,622 posts
  • Enterprise

How are you trying to restore the purchases?



[TOPIC: post.html]
#3

rollerband

[GLOBAL: userInfoPane.html]
rollerband
  • Observer

  • 27 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
  • Corona Geek

  • 1,031 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

  • 27 posts
  • Corona SDK

yes I know ) i use this:

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


[TOPIC: post.html]
#6

rune7

[GLOBAL: userInfoPane.html]
rune7
  • Contributor

  • 373 posts
  • Corona SDK

@rollerband,

 

We are similarly stuck with iOS13 change in receipts. Have you been able to resolve the problems around apple IAP plug-in? 



[TOPIC: post.html]
#7

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,031 posts
  • Corona Staff

I'm not sure what is your issue with receipts. Code which is handling receipts did not change for years. This days receipt validation should happen on server, or, locally, with new IAP plugin.



[TOPIC: post.html]
#8

rune7

[GLOBAL: userInfoPane.html]
rune7
  • Contributor

  • 373 posts
  • Corona SDK

Well, Corona code may gad no change, but Apple certainly made a change to the receipt in iOS13 and the old store API does not handle it well, so now we cannot verify a purchase! The new IAP plugin is supposed to replace the old store API. The problem I have is that there is no clear migration guide to the new IAP plugin. It behaves differently. It has new methods and different event management. We have no clue how the developer of this plugin intended us to use it. There is literally no documentation about this plugin not to mention that its still marked as experimental.

[TOPIC: post.html]
#9

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,031 posts
  • Corona Staff

Next daily build should have a fix for your issue.



[TOPIC: post.html]
#10

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 956 posts
  • Corona SDK

Is this fixed?



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

This should have been fixed in 2019.3564

 

Rob




[topic_controls]
[/topic_controls]

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