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

Question: Dont we have to check PurchaseState? #104

Closed
EmilAlipiev opened this issue Jan 10, 2018 · 3 comments
Closed

Question: Dont we have to check PurchaseState? #104

EmilAlipiev opened this issue Jan 10, 2018 · 3 comments

Comments

@EmilAlipiev
Copy link

Are the lines below in the documentation are correct? are we not supposed to check PurchaseState or we accept it successful, if purchase object is not null?

if (state == PurchaseState.Purchased)
//possibility that a null came through.
        if(purchase == null)
        {
            //did not purchase
        }
        else
        {
            //purchased!
        }
@jamesmontemagno
Copy link
Owner

jamesmontemagno commented Jan 10, 2018

You can as well depending on how far down the rabbit hole you want to go.

@EmilAlipiev
Copy link
Author

I asked this because there statuses like Canceled, Failed, Deferred, PaymentPending etc. are we not expecting these?

@jamesmontemagno
Copy link
Owner

Anything can happen. It is possible that another value comes through, especially on iOS, but not very often from my testing.

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

No branches or pull requests

2 participants