pcrawfor / iap_verifier

Node.js implementation of iOS In App Purchase receipt verification
MIT License
158 stars 37 forks source link

No timeout on network request #8

Open objectiveSee opened 11 years ago

objectiveSee commented 11 years ago

An Apple receipt validation request never times out. Callback never called which is unideal for how we use it. I am looking into this now.

objectiveSee commented 11 years ago

No idea how to do this w/ Coffee. ;) Anyone can help? I am scared to use this module in production because of the lack of a timeout.

pcrawfor commented 11 years ago

I should have some time to make a fix on Monday. Will ping you back then.

Paul

Sent from my iPhone

On Sep 13, 2013, at 4:17 PM, objectiveSee notifications@github.com wrote:

No idea how to do this w/ Coffee. ;) Anyone can help? I am scared to use this module in production because of the lack of a timeout.

— Reply to this email directly or view it on GitHub.

objectiveSee commented 11 years ago

Hey @pcrawfor any progress on this? Would love to add this to our production app. We get $200 a day in fake purchases but I don't feel safe putting receipt verification up w/o a timeout. :beers: for you!

hems commented 9 years ago

you can easily implement a timeout, just by creating a setTimeout yourself.

verification_failed = -> 
  # do your verification failed routine

verification_succeed = ->
  clearTimeout timeout_id # clear the timeout, so failed is never called
  # do your success routine

timeout_id = setTimeout verification_failed, 3000 # 3 secs

verify_your_receipt verification_succeed, blah blah blah