-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
iOS: This in-app purchase has already been bought. #257
Comments
@siderakis Yeah strange. I've already patched this problem like told in stackoverflow but still occurring in some devices. I am willing to fix this too. Which device are you using? |
@siderakis This might solve your app in bad state I guess. Could you try? |
I tried it and it didn't work. I also reinstalled the app and that didn't help. It's running on an iPad. |
I set a breakpoint and it looks like currentQueue.transactions is empty |
From SKPaymentQueue.h
Maybe I called it too soon |
I called the code later in the programs execution and it fixed the issue. |
@siderakis Sorry for bothering. But, what code did you call ? |
I was calling this native code. When I called it in This worked:
I'm not sure how but maybe we can expose this functionality in the library? |
@siderakis Yes. That's what I meant in issue #259 . |
@JJMoon, I have the same issue, When can we expect a resolution for exposing a method as you mentioned above. Thanks. |
@sivrihuseyin Problem is well known now. We will make the patch this weekend. Thank you to all issuers. |
We've released the expected solution in |
Hello Hyo Chan,
Thank you for the information.
I have installed the version 2.2.0 and tried the code. Unfortunately, the
issue is not fixed yet. think that the function, *clearTransaction *has not
been exported. In reactNative environment there is no clearTransaction
function inside RNIap.
I checked the file index.d.ts and I couldn't see the function as
clearTransaction in this. file.
Kind regards,
Huseyin
…On Sun, Sep 16, 2018 at 2:25 PM Hyo Chan Jang ***@***.***> wrote:
Closed #257 <#257>
via a5f225d
<a5f225d>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#257 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AiH7bOp96EzsoX82UVxKHK2LkN7PNWVAks5ubjUogaJpZM4WmG_0>
.
|
Hello Hyo Chan,
I am sorry for the wrong information. IT IS FIXED. There is no problem
anymore.
Thank you for your prompt response and great solution.
Kind regards,
Huseyin
On Sun, Sep 16, 2018 at 2:56 PM Huseyin Sivri <sivri.huseyin@gmail.com>
wrote:
… Hello Hyo Chan,
Thank you for the information.
I have installed the version 2.2.0 and tried the code. Unfortunately, the
issue is not fixed yet. think that the function, *clearTransaction *has
not been exported. In reactNative environment there is no clearTransaction
function inside RNIap.
I checked the file index.d.ts and I couldn't see the function as
clearTransaction in this. file.
Kind regards,
Huseyin
On Sun, Sep 16, 2018 at 2:25 PM Hyo Chan Jang ***@***.***>
wrote:
> Closed #257 <#257>
> via a5f225d
> <a5f225d>
> .
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#257 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AiH7bOp96EzsoX82UVxKHK2LkN7PNWVAks5ubjUogaJpZM4WmG_0>
> .
>
|
It is fixed with the version 2.2.0 by applying clearTransaction function. Thank you |
For future Googlers upgrading from v2 to v3-5, I found this helpful |
Version of react-native-iap
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
Makes a purchase
const purchase = await RNIap.buyProductWithoutFinishTransaction(productId)
const { transactionReceipt, purchaseToken } = purchase
sendToServer(transactionReceipt, {
onSuccess: () => {
RNIap.finishTransaction()
RNIap.consumeAllItems()
}})
Actual behavior
Dialog: “This in-app purchase has already been bought”. This is only happening for one SKU, others are working fine. I think the app got in a bad state and I don't see a way to fix it. I tired to call
finishTransaction
andconsumeAllItems
on initialization but that didn't fix it. Other SKUs I can purchase multiple times without issue. Nothing is returned forgetPurchaseHistory
.Tested environment (Emulator? Real Device?)
Device (sandbox)
Steps to reproduce the behavior
I'm not sure.
The text was updated successfully, but these errors were encountered: