Android Tutorial Android In-App Billing v3 Tutorial

deltacode

Member
Licensed User
Longtime User
Hi, added this and put my list of purchases in the app.

when a user goes to buy it comes back

Purchase currency not supported

User is English and its on the market in the beta channel, anybody seen this message before ? Have i missed a setting ?

B4X:
dim strPayment as string = "payment_100"
manager.RequestPayment(strPayment, "inapp", "myApp v" & Vars.APP_VERSION)

payment_100 is one of the payments i have setup on the market.
 

deltacode

Member
Licensed User
Longtime User
This is a preconfigured setup as im replacing an old java project with a new sparkling B4A project. It was working against the billing v1 originally and the currency was GBP.
 

JOANORSKY

Member
Licensed User
Longtime User
Hi there... i have received this email from google a few days ago... can anyone inform me how this affects the current inapp Billing and how can i upgrade it?




The fact is .. that somehow.. someguys... are now becoming to be able to order some of my products without the payment have has been cleared (i have a implemented system that a email is sent ordering the item when the payment clears, but, these last weeks.. i've been receiving emails ordering.. but when i check it.. the payment is nowhere to be found.. probably because of this exploit. Anyone wants to comment?
 
Last edited:

touchsquid

Active Member
Licensed User
Longtime User
Hi Erel,

Just testing with an app here, but it seems I get the same Purchase State back whether the app is purchased, canceled, or refunded.

Sub Manager_OwnedProducts(Success As Boolean, Purchases As Map)
If Success Then
If Purchases.Size > 0 Then
For Each p As Purchase In Purchases.Values
If p.PurchaseState <> p.STATE_PURCHASED Then Activity.Finish
Next
Else
Activity.Finish
End If
End If
End Sub

I should also mention that there is only one possible product to purchase.
 
Last edited:

touchsquid

Active Member
Licensed User
Longtime User

If we consume a purchased product, will it still appear as a purchased product (if it hasn't been canceled or refunded)?
 

tufanv

Expert
Licensed User
Longtime User
Hello Erel in the first page a mamber asked that he cant use ownedproducts . ( I got an error as ownedproducts is not declared)
If ownedProducts.ContainsKey("test2") Then
manager.ConsumeProduct(ownedProducts.Get("test2"))
EndIf

I cant use it too . You had asked him if he knows autocomplete function but i couldnt understand how to do it. ownedproducts is coming in red in my code section as it is not declared. Can you help
 

tufanv

Expert
Licensed User
Longtime User
I call Manager.GetOwnedProducts after purchase completed in purchasecomplete event . And then in owned products event sub i can access what user bought but cant consume it because it still doesnt recognize ownedproducts as not declared (in red) . sorry for noob questions i had no problem with 1 single managed item i was directly going to purchasecomplete event and do what i want but now mecause i have multiple items i need to consume it and now which item was bought
 

tsteward

Well-Known Member
Licensed User
Longtime User
"The publisher can not purchase this item"
This really sucks. I want to run in debug mode and see what the map actually contains, watch how my app reacts etc.
Also the minimum price you can set is $0.99 so it could cost a dollar. Just set a trial period I guess and uninstall. But still can't debug can I?

Have I missed something?
 

tsteward

Well-Known Member
Licensed User
Longtime User
Please can anyone advise how I test this? Surely there is a way!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…