"Has product" and "On purchase product" actions not working

Ideas and discussion about publishing and distributing your games

Post » Sat Apr 16, 2016 5:50 pm

Have you checked "On Restore purchases failed" condition? It also returns CordovaIAP.ErrorMessage. Maybe there is some problem with the store (settings?), not the implementation.
ImageImageImage
B
27
S
16
G
80
Posts: 1,021
Reputation: 44,761

Post » Sat Apr 16, 2016 6:17 pm

Yes, and "On Restore purchases succeded" and "...failed" do nothing. I have no idea what the store settings should be checked. It seems everything is properly setted.
B
16
S
6
G
1
Posts: 124
Reputation: 1,984

Post » Mon Apr 18, 2016 4:40 am

Hey @SparklingAir,

I didn't do any iOS exports for one year now, but bere are a few ideas :

- DO NOT add a space next to the commas when you define your products IDs (this one got me stuck for months!)
- Restore purchases never worked for me.
- Make a very simple test to be very sure what's working or not.
- Not sure they are still useful, but see the related topic I posted about one year ago when I was trying to make my game to work on iOS. It wasn't easy.
- Hang in there! You'll do it!
- Support my game on Kickstarter with the link below (this one is completely unrelated to your problem, sorry ^^' )

I will try to see what's still possible later today when I'll have more time available.

Good luck!
B
32
S
6
G
1
Posts: 353
Reputation: 2,814

Post » Mon Apr 18, 2016 6:04 am

@SparklingAir

What about the Action "IAP.PurchaseProduct"? Does it trigger the Buy dialog box?
The "On Purchase" is only triggered after a successfully purchase that is initiated by the above action call.

Next, how are you testing your app on the device? TestFlight (using Production certificate) or Adhoc test (using Adhoc provision certificate)?

If Adhoc, then I think the IAP will not work?

Next whats the Status (eg: Ready for Review, Approved, Ready for Submission, etc) of your IAP in iTunes Connect?
Lastly, whats the status of your iTunes Contracts? If Financial Contracts are not effective, then IAP will not showup in the game.
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
13
G
2
Posts: 421
Reputation: 5,397

Post » Mon Apr 18, 2016 8:27 am

Hello @Rable!
Thank you for reply!

1. I have no spases after commas in "Add product ID". Moreover, adding, requesting and purchasing works fine.
2. Thanks to BackendFreak I understood that should be used "Restore purchases" that "Has product" and "On purchase"
conditions have begun to work. But all of them don't work.
3. I did the test with three lines - the same.
4,5 I will read, and, if properly understood, will continue to fight :)
6. I will participate in your campaign. :)
B
16
S
6
G
1
Posts: 124
Reputation: 1,984

Post » Mon Apr 18, 2016 9:29 am

Hello, @SamRock !
Thank you for reply!

"PurchaseProduct" working fine. It triggers dialog box and offers me to make a purchase or says that it has already made.
I test through Adhoc and sandbox.
Part of the product has the status approved and other part - "Ready for Submission". For all this products action "PurchaseProduct" works ok.
In finantional section all ok.
B
16
S
6
G
1
Posts: 124
Reputation: 1,984

Post » Wed Apr 20, 2016 6:57 am

@SparklingAir Thats strange!
I am now worried now how my IAPs are doing! I dont have a device to test. May be you can try it once :D

BTW, when testing in Sandbox are you using a different user ID or your Apple dev user id (in which case also I doubt IAP will work)?

I cant think of anything right now! I hope the products are spelt right in your events , other than that everything looks in order. If possible post a screenshot of your iAP code

EDIT: Saw your code, and it says "on Restore Purchase", shouldn't it be "On Product Purchase"?
"Restore" is used only when you have reinstalled the game and want to restore past consumable purchases. Apple requires this to be a button in the IAP screen.
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
13
G
2
Posts: 421
Reputation: 5,397

Post » Sat Apr 30, 2016 2:16 pm

Hello!
Apparently, the problem is in the plugin.
I am in correspondence with the author of the plugin, and his refined example also not working.
He made some changes and updated GiHub, but they did not help. He continues to understand with the matter.
B
16
S
6
G
1
Posts: 124
Reputation: 1,984

Post » Mon May 09, 2016 11:52 am

@SparklingAir
@BackendFreak
@Rable
@SamRock

This issue was because of xdk cordova version update compatibility with cordova iap plugin.
But fixed this.
Build again and test it.

Thanks for your patience.
Sang Ki Kwon
Construct2 Cordova Plugins (currently 87 plugins): https://www.scirra.com/store/construct2 ... ugins-1662

Construct2 Prototype Capx (currently 50 capx): https://www.scirra.com/store/games-with ... -capx-3088

Home page: http://cranberrygame.com
B
65
S
22
G
81
Posts: 780
Reputation: 46,631


Previous

Return to Distribution and Publishing

Who is online

Users browsing this forum: No registered users and 2 guests