- Home /
 
Prime 31 In App Billing Android
Hi, i have been integrating IAB for android with prime 31's plugin. So far its been working great, but when a user purchases a product, what function call do I use to return that value? This is my purchase code.
IABAndroid.purchaseProduct( "150_coins" );
What function would I use to return if the purchase worked? I tried:
 void purchaseSucceededEvent( string productId )
 {
 if(productId == "150_coins")
     {
     oldCoins += 150;
     }
 }
 
               But this doesn't work.
Thanks in advance for any help!
just so you know there's now a Prime31 help forum - you can usually get answers pretty quickly
I am also facing the same problem. Were you able to find any solution?
Answer by cjow · Jun 07, 2013 at 03:02 PM
Probably because the purchaseSucceededEvent takes a GooglePurchase object as a parameter, not a string.
 void purchaseSucceededEvent( GooglePurchase purchase )
 {
     swtich( purchase.productId )
     {
         case "idString1":
             // do stuff
             break;
         
         default:
             break;
     }
 }
 
              Your answer
 
             Follow this Question
Related Questions
Programmatically changing brightness setting on Android using c# 0 Answers
UI works in editor, but not on mobile device 1 Answer
Moving an object in Unity3d for Android 0 Answers
How to scale different GUI objects to fit screen size ANDROID 1 Answer
Android: After the third touch all touches get cancelled 1 Answer