Skip to content
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

Nothing happened when payment success. #199

Open
YasirAmeen opened this issue Aug 29, 2016 · 35 comments
Open

Nothing happened when payment success. #199

YasirAmeen opened this issue Aug 29, 2016 · 35 comments
Labels

Comments

@YasirAmeen
Copy link

I want to show custom dialog when payment process complete. Nothing happened when payment success, we have to click again to purchase for receiving a result. In short onProductPurchased() is useless for the first time buy click.

@frankyxcs
Copy link

frankyxcs commented Aug 30, 2016

Hi i have the same problem . also the purchase is working fine. But i´m getting (after hitting the "OK" button) the error "Error ! You already own this product! and then nothing happens.

Only hitting the purchase button again will restore the purchase and it works.

would be nice to fix this ! Thanx in advance

@joshid
Copy link

joshid commented Sep 2, 2016

Same issue here with suscriptions. Nothing happens when payment is complete...
Any workaround meanwhile?

@frankyxcs
Copy link

No the payment is fine and works for me but the bug after buying sucks :) and i really do not now how to fix it
i hope anyone can provide a fix for this

@mustii82
Copy link

mustii82 commented Sep 2, 2016

I use this

@Override
public void onBillingError(int errorCode, Throwable error) {
    // Called when some error occurred. See Constants class for more details

    if (errorCode == 102 || errorCode == 103)
        bp.purchase(this, ITEM_ID);

}

@joshid
Copy link

joshid commented Sep 2, 2016

The point is that there is no errors so onBillingError is not called.
The problem is that no feedback method is called when payment is successfully completed.

@frankyxcs
Copy link

Im getting only this error here after successfull purchase in my preferencefragment
public static final int BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;
//Failure to purchase since item is already owned
and public void onProductPurchased is not called the first time

@YasirAmeen
Copy link
Author

Is this working? You tested?

On Sep 3, 2016 1:00 AM, "Musti" notifications@github.com wrote:

I use this

@OverRide
public void onBillingError(int errorCode, Throwable error) {
// Called when some error occurred. See Constants class for more details

if (errorCode == 102 || errorCode == 103)
    bp.purchase(this, ITEM_ID);

}


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#199 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIorey7bZRIwtHVOm_j1_gjNwni5O8idks5qmIBvgaJpZM4Jv20X
.

@YasirAmeen
Copy link
Author

Who developed the library ?
Developer is reading all our comment ?

@serggl
Copy link
Member

serggl commented Sep 3, 2016

Can someone wrap it out into PR? Happy to merge it anytime

@mustii82
Copy link

mustii82 commented Sep 3, 2016

@frankyxcs I think you must consume it first to purchase the item again

@mustii82
Copy link

mustii82 commented Sep 3, 2016

@YasirAmeen Yes I tested and it works if you get this error codes

@frankyxcs
Copy link

@mustii82 no i do not want to consume the purchase. One time purchase is ok for me. And i was wrong here BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;
is not a billing error ... it´s a response

i hope somebody here is deeper with this billing stuff and maybe nows hopefully how to fix it or the developer here

there must be a bug in billingprocessor.java nearby here
else if (response == Constants.BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED) {
if (!isPurchased(productId) && !isSubscribed(productId))
loadOwnedPurchasesFromGoogle();

@YasirAmeen
Copy link
Author

Ok good and what if, we have multiple products for selling, how can i
recognized them in on error.

On Sep 4, 2016 3:10 AM, "Musti" notifications@github.com wrote:

@YasirAmeen https://github.com/YasirAmeen Yes I tested and it works if
you get this error codes


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#199 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIore4PJfdXuVq8NBy9Rw3uj7hP7UR_Pks5qmfBYgaJpZM4Jv20X
.

@mustii82
Copy link

mustii82 commented Sep 4, 2016

@YasirAmeen Thats easy make a Static String lastPurchase and on every purchase attempt you can set lastPurchase with the purchased itemID and if it failed the variable lastPurchase will contain the last purchase Item ID

@mustii82
Copy link

mustii82 commented Sep 4, 2016

@frankyxcs you can't do this you must consume it the api changed so you must consume every purchase before you can buy some more of it. so consume it directly after purchase like i do

@frankyxcs
Copy link

@mustii82
i have tried it now again. the purchase works fine but the 1st time onProductPurchased is not called and also i do not have any billingerror :( i have then to hit the purchase button again and everything is fine ...really do not know how to fix this little bug.

@umashankarpandey
Copy link

i am facing same error as @frankyxcs

after purchased it say "Error ! You already own this product!"

and did not called onProductPurchased

@mustii82
Copy link

mustii82 commented Sep 8, 2016

@frankyxcs you can use purchase("ITEMID") on onProductPurchase()

thats a hot fix

@frankyxcs
Copy link

@mustii82
you mean onProductPurchased() ? but this is not called the 1st time. so it would be useless
or i do not understand now what you mean

@ItsCalebJones
Copy link

ItsCalebJones commented Sep 8, 2016

@umashankarpandey @frankyxcs i'm seeing this same bug as well.

@mustii82
Copy link

mustii82 commented Sep 8, 2016

override the purchase method the Library is very buggy but I think this is a good hot fix

@OverRide
public purchase(String id){
super.purchase(id);
super.purchase(id);
}

@ItsCalebJones
Copy link

Hm, i'm not sure that's a good hot fix. Any idea if this repo is still being maintained? I know the issue count is pretty high and it's been a few months since a commit. I wonder if one of the devs would be available to work on this library.

Unfortunately this looks like the only IAP billings libraries.

@frankyxcs
Copy link

Anyone hast tested the library from this guy here yet ? It´s based on this library
https://github.com/pavlospt/RxIAPv3
Just downloaded this and i will check this out later. hopefully it will work with my preferencefragment

@mustii82
Copy link

mustii82 commented Sep 8, 2016

@caman9119 I never said that this hot fix is the best solution but a quick one thats because it called hot fix. this library is not the only IAP Library for Android

@frankyxcs
Copy link

@mustii82
thanx i will try this out later too how it works..but it would be very good if the developer here could fix the library or another person who is deeper involved with all the billing stuff.

so i have to put this into billingprocessor.java ??
@OverRide
public purchase(String id){
super.purchase(id);
super.purchase(id);
}

@ItsCalebJones
Copy link

@mustii82 Sorry, didn't mean it negatively. I'll test it out though.

@umashankarpandey
Copy link

Hi All

i think this lib has no issue because i am using Trivial Drive suggested by android

after purchased success when press "OK" it say "Error ! You already own this product!"
and did not called onProductPurchased

This is error due to google policy

for first Time if product cost is 60 INR

then google deduct 60+50(as $1) 50 for google account verification once it is verified then it google will return you amount 50INR

after this for next purchase you will be never charged extra

and no errors as we are mentioned

promo codes also will be working after this

so try first purchase only with credit card

Thanks to all of you

@YasirAmeen
Copy link
Author

@umashankarpandey so are you sure about that ? can we use it in a production app ?

@umashankarpandey
Copy link

Yes sure bro i am using it in my app https://play.google.com/store/apps/details?id=com.spraato.teenpatti

@YasirAmeen
Copy link
Author

Bro can i have your whatsapp contact bro ? email me here yasirameen92@gmail.com

@umashankarpandey
Copy link

+919711090237 whatsapp and uspmca@gmail.com email i just send you an email also

@serggl
Copy link
Member

serggl commented Oct 25, 2016

one more suggestion is that there is some issue with handleActivityResult. Can someone who face this error can confirm that its actually being called as per README?

@franciscofranco
Copy link

I have this same problem just now. handleActivityResult is being called. requestCode is 32459, resultCode is -1.

@curliq
Copy link

curliq commented Jun 11, 2017

I was having the same issue, turned out I just forgot to override onActivityResult, did that and it's working.

@umashankarpandey
Copy link

Check above my answer please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants