-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No value for developerPayload" BillingError on Promo Code use #156
Comments
I ran into this same issue when I tried to purchase items with a promo code. |
Same issue here |
I have the same issue |
Same issue here... I dont understand why this lib bother with developerPayload. This is really something useful when you have a backend that process the purchases responses, and the check is done on the backend (both signature and developerPayload) |
Have there been any updates on this? Wanting to use promo codes with my customers. |
Same here. Using the above workaround for now. |
Can anyone paste a full stack trace for this problem? From the line above it seem like some error from billing service, not from the library itself. |
how to use this lib with promotional or redeem code? i am try with direct add item but google in i can see add item success but in code not get success. how to solve it for redeem code. @serggl |
Does anybody know if there is some additional setup needed in order to be able to enter promo codes directly on the purchase dialog? and not at the Google Play's redeem promo code section? |
@serggl Promo codes work when entered in Google Play > menu > redeem, but only if you don't use a payload. Other method by entering in the purchase dialog, gives an error. When trying to purchase again, it gives an error it is already purchased, but https://developer.android.com/google/play/billing/billing_promotions.html#workflow
In my tests, eventually the promo code will become "active", but takes some time. |
@SuperThomasLab seem like you are good in this context, can you help me testing code from |
@serggl I checked out the About the purchase dialog: If we just leave the payload as it is, there's still one problem with promo codes: Entering it through the purchase dialog. After you enter a promo code, and tap buy, BTW: The following URL opens Google Play and automatically enters the promo code: https://play.google.com/redeem?code=YOURPROMOCODE. Might be useful for something. I currently use this with a custom redeem dialog to prevent users entering it in the purchase dialog. |
@SuperThomasLab I only have an option to change the payment method, not to redeem a promo code, really dont know why (maybe because my test app was never released from alpha to production mode). |
@serggl This is the code I used:
This is the output of a normal purchase:
This is the output when using a promo code in purchase dialog:
As you can see, there's no developer payload. (And the method Here are some screenshots of the purchase dialog: http://imgur.com/a/2yGfe |
@SuperThomasLab this seem like a known issue already: https://github.com/googlesamples/android-play-billing/issues/7 |
@serggl There are two options:
|
@SuperThomasLab I agreed on your options, with some notes:
Not sure what the best option would be. Anyone else reading this thread? Thoughts? |
There is an official (not so good) answer finally on this topic https://github.com/googlesamples/android-play-billing/issues/7#issuecomment-305316583 |
well, why not good? at least it is now officially documented behaviour which we can deal with |
I am testing adding Promo Code support into my app, and while I can make a normal payment for an in-app purchase, I run into problems when I try using a promo code. The response comes back with this error:
E/iabv3: org.json.JSONException: No value for developerPayload
I am working around the problem at the moment by doing this:
if (errorCode == Constants.BILLING_ERROR_OTHER_ERROR && _billingProcessor.loadOwnedPurchasesFromGoogle() && _billingProcessor.isPurchased(SKU))
The result of that is usually true, which proves that the purchase DID succeed, just the response was lacking the developerPayload that the library expects.
The text was updated successfully, but these errors were encountered: