sdkbox / issues

The issue tracker for SDKBOX
MIT License
4 stars 0 forks source link

iap-plugin-this-in-app-purchase-has-already-been-bought-it-will-be-restored-for-free-issue #36

Closed ghost closed 6 years ago

ghost commented 6 years ago

http://discuss.cocos2d-x.org/t/iap-plugin-this-in-app-purchase-has-already-been-bought-it-will-be-restored-for-free-issue/37951/11

ghost commented 6 years ago

http://discuss.cocos2d-x.org/t/iap-plugin-this-in-app-purchase-has-already-been-bought-it-will-be-restored-for-free-issue/37951/18


My IAP don’t verify with server. It is a local game. I can reproduce the case easily by the following steps:

  1. click the “buy” button.
  2. send request to Apple server by sdkbox sdk.
  3. kill the game by memory warning , let the game killed. (this will caused the finishTransaction function be not called, and the user can’t get any goods from IAP , although the user did purchase success . )
  4. When you restart the game, it will popup out “This In-App Purchase has already been bought. It will be restored for free.” in your iOS devices. And you the user can’t buy the items again.

PS: All my goods are consumable too.

ghost commented 6 years ago

checked with 2.3.17.3

precondition

test item is consumable

two cases

TEST ONE

  1. click 'pucharse' item
  2. click 'buy' button in system IAP dialog
  3. kill the game in Xcode
  4. start the game before "Your purchase was successful."
  5. got onSuccess called
  6. click 'purchase' item
  7. (steps 1~4) works fine

TEST TWO

  1. click 'pucharse' item
  2. click 'buy' button in system IAP dialog
  3. kill the game in Xcode
  4. will for "Your purchase was successful." message on Home screen
  5. start the game
  6. got onSuccess called
  7. click 'purchase' item
  8. (step 1~4) works fine.

“This In-App Purchase has already been bought. It will be restored for free.” did not popup with the two cases.