Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Improved Callback and Error Handling#86

Merged
cbrevik merged 3 commits intoidehub:masterfrom
wonderkiln:master
Jan 17, 2018
Merged

Improved Callback and Error Handling#86
cbrevik merged 3 commits intoidehub:masterfrom
wonderkiln:master

Conversation

@austinkettner
Copy link
Contributor

@austinkettner austinkettner commented Nov 11, 2017

@idehub here are the edits we made for improved and proper handling with in-app-billing-v3

Related and resolves #85

package.json Outdated
{
"name": "react-native-billing",
"version": "2.4.0",
"version": "2.4.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review this PR in more detail later. But please do not manually update the version number in PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this? As part of these changes we expect the version to be incremented. It doesn't make sense for us to downgrade this as we increment it for proper cache/references in lockfiles.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you do for forks is not up to me. But for upstream, i.e. this repository, I want to increment the version myself. This is because I might add other changes along with this version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Thanks @cbrevik -- we will update this.

@austinkettner
Copy link
Contributor Author

Ok, reverted to 2.4.0, you can do a squash now. We are ok with this being merged =) @cbrevik

@cbrevik
Copy link
Member

cbrevik commented Dec 6, 2017

Cool, I'll look into this tomorrow! Has the code been tested by you in your app(s)?

@austinkettner
Copy link
Contributor Author

Yep we have used it in our apps and through that testing is how we resolved the various callback issues.

@kawashimaken
Copy link

It will be great to see this pull request to be merged soon! 😃

@npinochet
Copy link

I'd tried this pull request, but I'm still getting no callbacks from some functions like InAppBilling.getProductDetailsArray. It appears this fix doesn't solve the problem.

@cbrevik cbrevik merged commit 8fe82df into idehub:master Jan 17, 2018
@freiserg
Copy link

After this PR 'purchase' doesn't return transactionDetails. It returns 'true'.

@kristfal
Copy link

@freiserg I have the same issue.

This PR breaks the current functionality of the lib and should be marked as a breaking change with the associated readme updates.

A current workaround is:

Purchase -> loadOwnedPurchases -> listOwnedSubscriptions / products -> validate each receipt

@cbrevik
Copy link
Member

cbrevik commented Jan 28, 2018

I'll look into this. Resolving with true is obviously a bug.

cbrevik added a commit that referenced this pull request Jan 29, 2018
@cbrevik
Copy link
Member

cbrevik commented Jan 29, 2018

I've reverted this PR, and added a new function.
Call InAppBilling.shortCircuitPurchaseFlow(true) to short circuit the normal purchase flow and return true as in this PR if purchase seems to have gone successfully. This is for the people having problems with no callbacks, and want the functionality of this PR.

I'd recommend re-testing with the newest version of this lib (2.6.0) though. I've updated the dependent version of the underlying lib, and they have some changes around handleActivityResult.

@lock
Copy link

lock bot commented Jan 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Callback on first invocation of InAppBilling.purchase

6 participants